Azure Event Hubs binding spec
To setup an Azure Event Hubs binding, create a component of type . See this guide on how to create and apply a binding configuration.
See for instructions on how to set up an Event Hub.
Warning
The Azure Event Hubs pub/sub component supports authentication using all Azure Active Directory mechanisms. For further information and the relevant component metadata fields to provide depending on the choice of AAD authentication mechanism, see the .
This component supports output binding with the following operations:
create
: publishes a new message to Azure Event Hubs
The device-to-cloud events created by Azure IoT Hub devices will contain additional IoT Hub System Properties, and the Azure Event Hubs binding for Dapr will return the following as part of the response metadata:
System Property Name | Description & Routing Query Keyword |
---|---|
iothub-connection-auth-generation-id | The connectionDeviceGenerationId of the device that sent the message. See . |
iothub-connection-auth-method | The connectionAuthMethod used to authenticate the device that sent the message. |
The deviceId of the device that sent the message. See IoT Hub device identity properties. | |
iothub-connection-module-id | The moduleId of the device that sent the message. See . |
iothub-enqueuedtime | The enqueuedTime in RFC3339 format that the device-to-cloud message was received by IoT Hub. |
message-id | The user-settable AMQP messageId. |
For example, the headers of a HTTP Read()
response would contain:
{
'host': '127.0.0.1:3000',
'content-type': 'application/json',
'content-length': '120',
'iothub-connection-device-id': 'my-test-device',
'iothub-connection-auth-generation-id': '637618061680407492',
'iothub-connection-auth-method': '{"scope":"module","type":"sas","issuer":"iothub","acceptingIpFilterRule":null}',
'iothub-connection-module-id': 'my-test-module-a',
'iothub-enqueuedtime': '2021-07-13T22:08:09Z',
'message-id': 'my-custom-message-id',
'x-opt-enqueued-time': '2021-07-13T22:08:09Z',
'x-opt-offset': '21560',
}