The documentation you are viewing is for Dapr v0.11 which is an older version of Dapr. For up-to-date documentation, see the latest version.

Azure Events Hub

Detailed documentation on the Azure Event Hubs pubsub component

Setup Azure Event Hubs

Follow the instructions here on setting up Azure Event Hubs. Since this implementation uses the Event Processor Host, you will also need an Azure Storage Account.

Create a Dapr component

The next step is to create a Dapr component for Azure Event Hubs.

Create the following YAML file named eventhubs.yaml:

kind: Component
  name: <NAME>
  namespace: <NAMESPACE>
  version: v1
  - name: connectionString
    value: <REPLACE-WITH-CONNECTION-STRING> # Required. "Endpoint=sb://****"
  - name: storageAccountName
  - name: storageAccountKey
  - name: storageContainerName
    value: <REPLACE-WITH-CONTAINER-NAME > # Required.

See here on how to get the Event Hubs connection string. Note this is not the Event Hubs namespace.

Create consumer groups for each subscriber

For every Dapr app that wants to subscribe to events, create an Event Hubs consumer group with the name of the dapr id. For example, a Dapr app running on Kubernetes with "myapp" will need an Event Hubs consumer group named myapp.

Apply the configuration

Visit this guide for instructions on configuring pub/sub components.