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

    1. apiVersion: dapr.io/v1alpha1
    2. kind: Component
    3. metadata:
    4. namespace: default
    5. spec:
    6. type: pubsub.azure.servicebus
    7. version: v1
    8. metadata:
    9. - name: namespaceName # Required when using Azure Authentication.
    10. value: "servicebusnamespace"
    11. - name: azureTenantId
    12. - name: azureClientId
    13. value: "***"
    14. - name: azureClientSecret
    15. 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