Azure Event Hubs binding spec

Detailed documentation on the Azure Event Hubs binding component

Component format

To setup Azure Event Hubs binding create a component of type bindings.azure.eventhubs. See this guide on how to create and apply a binding configuration.

See this for instructions on how to set up an Event Hub.

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: <NAME>
  5. namespace: <NAMESPACE>
  6. spec:
  7. type: bindings.azure.eventhubs
  8. version: v1
  9. metadata:
  10. - name: connectionString # Azure EventHubs connection string
  11. value: "Endpoint=sb://****"
  12. - name: consumerGroup # EventHubs consumer group
  13. value: "group1"
  14. - name: storageAccountName # Azure Storage Account Name
  15. value: "accountName"
  16. - name: storageAccountKey # Azure Storage Account Key
  17. value: "accountKey"
  18. - name: storageContainerName # Azure Storage Container Name
  19. value: "containerName"
  20. - name: partitionID # (Optional) PartitionID to send and receive events
  21. value: 0

Warning

The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described here.

Spec metadata fields

FieldRequiredBinding supportDetailsExample
connectionStringYOutputThe EventHubs connection string. Note that this is the EventHub itself and not the EventHubs namespace. Make sure to use the child EventHub shared access policy connection string“Endpoint=sb://**
consumerGroupYOutputThe name of an EventHubs Consumer Group to listen on“group1”
storageAccountNameYOutputThe name of the account of the Azure Storage account to persist checkpoints data on“accountName”
storageAccountKeyYOutputThe account key for the Azure Storage account to persist checkpoints data on“accountKey”
storageContainerNameYOutputThe name of the container in the Azure Storage account to persist checkpoints data on“contianerName”
partitionIDNOutputID of the partition to send and receive events0

Binding support

This component supports output binding with the following operations:

  • create

Related links

Last modified March 18, 2021: Merge pull request #1321 from dapr/aacrawfi/logos (9a399d5)