Azure Service Bus
To setup Azure Service Bus pubsub create a component of type . See this guide on how to create and apply a pubsub configuration.
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described here.
Example Configuration
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
namespace: default
spec:
type: pubsub.azure.servicebus
version: v1
metadata:
- name: namespaceName # Required when using Azure Authentication.
value: "servicebusnamespace"
- name: azureTenantId
- name: azureClientId
value: "***"
- name: azureClientSecret
value: "***"
Azure Service Bus messages extend the Dapr message format with additional contextual metadata. Some metadata fields are set by Azure Service Bus itself (read-only) and others can be set by the client when publishing a message.
To set Azure Service Bus metadata when sending a message, set the query parameters on the HTTP request or the gRPC metadata as documented here.
metadata.MessageId
metadata.SessionId
metadata.Label
metadata.ReplyTo
metadata.PartitionKey
metadata.To
metadata.ContentType
metadata.ScheduledEnqueueTimeUtc
metadata.ReplyToSessionId
metadata.DeliveryCount
metadata.LockedUntilUtc
metadata.LockToken
metadata.EnqueuedTimeUtc
To find out more details on the purpose of any of these metadata properties, please refer to .
Follow the instructions here on setting up Azure Service Bus Topics.
- Read this guide for instructions on configuring pub/sub components