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.
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <NAME>
namespace: <NAMESPACE>
spec:
type: bindings.azure.eventhubs
version: v1
metadata:
- name: connectionString # Azure EventHubs connection string
value: "Endpoint=sb://****"
- name: consumerGroup # EventHubs consumer group
value: "group1"
- name: storageAccountName # Azure Storage Account Name
value: "accountName"
- name: storageAccountKey # Azure Storage Account Key
value: "accountKey"
- name: storageContainerName # Azure Storage Container Name
value: "containerName"
- name: partitionID # (Optional) PartitionID to send and receive events
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
Field | Required | Binding support | Details | Example |
---|---|---|---|---|
connectionString | Y | Output | The 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://**“ |
consumerGroup | Y | Output | The name of an EventHubs Consumer Group to listen on | “group1” |
storageAccountName | Y | Output | The name of the account of the Azure Storage account to persist checkpoints data on | “accountName” |
storageAccountKey | Y | Output | The account key for the Azure Storage account to persist checkpoints data on | “accountKey” |
storageContainerName | Y | Output | The name of the container in the Azure Storage account to persist checkpoints data on | “contianerName” |
partitionID | N | Output | ID of the partition to send and receive events | 0 |
Binding support
This component supports output binding with the following operations:
create
Related links
- Basic schema for a Dapr component
- Bindings building block
- How-To: Trigger application with input binding
- How-To: Use bindings to interface with external resources
- Bindings API reference
Last modified March 18, 2021: Merge pull request #1321 from dapr/aacrawfi/logos (9a399d5)