Azure Event Hub Plugin

The plugin provides functionality to interact with Event Hub.

Installation

Example 1. build.gradle
implementation(group: 'org.vividus', name: 'vividus-plugin-azure-event-hub', version: '0.4.16')

Event Hub management

Configuration

Authentication

The authentication process relies on the configuration of the environment variables.

See the official "Azure identity" guide to get more details on what types of authentication could be used.

Azure environment selection

Azure environment could be optionally specified using either global property azure.environment (sets the environment for all Azure plugins) or plugin-specific property azure.event-hub.environment. The plugin-specific property takes precedence over the global one. The default value is AZURE.

The plugin-specific property azure.event-hub.environment is deprecated and will be removed in VIVIDUS 0.5.0. The global property must be used.

The supported environments are only:

  • AZURE

  • AZURE_CHINA

  • AZURE_GERMANY

  • AZURE_US_GOVERNMENT

Azure subscription selection

Azure subscription must be configured via AZURE_SUBSCRIPTION_ID environment variable.

Steps

Manage data capturing

Toggles data capturing option (enables or disables it) for the specified Azure Event Hub.

When I $toggle data capturing for event hub `$eventHubName` in namespace `$namespaceName` from resource group `$resourceGroupName`
  • $toggle - The data capturing toggle: either ENABLE or DISABLE.

  • $eventHubName - The event hub name.

  • $namespaceName - The name of the namespace the event hub belongs to.

  • $resourceGroupName - The resource group name.

The client should have permission to run action Microsoft.EventHub/namespaces/eventhubs/write over scope /subscriptions/{subscription ID}/resourceGroups/{resource group name}/providers/Microsoft.EventHub/namespaces/{event hub namespace}/eventhubs/{event hub name}.

Example 2. Restart data capturing
When I disable data capturing for event hub `sample_event_hub` in namespace `NS-EH` from resource group `RG-EH`
When I enable data capturing for event hub `sample_event_hub` in namespace `NS-EH` from resource group `RG-EH`