Azure Event Hub Plugin

The plugin provides functionality to interact with Event Hub.

Installation

  1. Copy the below line to dependencies section of the project build.gradle file

    Example 1. build.gradle
    implementation(group: 'org.vividus', name: 'vividus-plugin-azure-event-hub', version: '0.5.7')
  2. If the project was imported to the IDE before adding new plugin, re-generate the configuration files for the used IDE and then refresh the project in the used IDE.

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 the property azure.environment (sets the environment for all Azure plugins). The default value is AZURE.

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`