diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/servicebusqueues.md b/daprdocs/content/en/reference/components-reference/supported-bindings/servicebusqueues.md index e5a926d07..598eb203f 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/servicebusqueues.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/servicebusqueues.md @@ -11,7 +11,7 @@ aliases: To setup Azure Service Bus Queues binding create a component of type `bindings.azure.servicebusqueues`. See [this guide]({{< ref "howto-bindings.md#1-create-a-binding" >}}) on how to create and apply a binding configuration. - +### Connection String Authentication ```yaml apiVersion: dapr.io/v1alpha1 @@ -23,14 +23,13 @@ spec: type: bindings.azure.servicebusqueues version: v1 metadata: - - name: connectionString + - name: connectionString # Required when not using Azure Authentication. value: "Endpoint=sb://************" - name: queueName value: queue1 - name: ttlInSeconds value: 60 ``` - {{% alert title="Warning" color="warning" %}} The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}). {{% /alert %}} @@ -42,10 +41,36 @@ The above example uses secrets as plain strings. It is recommended to use a secr | connectionString | Y | Input/Output | The Service Bus connection string | `"Endpoint=sb://************"` | | queueName | Y | Input/Output | The Service Bus queue name. Queue names are case-insensitive and will always be forced to lowercase. | `"queuename"` | | ttlInSeconds | N | Output | Parameter to set the default message [time to live](https://docs.microsoft.com/azure/service-bus-messaging/message-expiration). If this parameter is omitted, messages will expire after 14 days. See [also](#specifying-a-ttl-per-message) | `"60"` | +| namespaceName| N | Input/Output | Parameter to set the name of the Service Bus namespace. Required if using AAD authentication. | `"namespace"` | ### Azure Active Directory (AAD) authentication The Azure Service Bus Queues binding 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 [docs for authenticating to Azure]({{< ref authenticating-azure.md >}}). +#### Example Configuration +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: + namespace: +spec: + type: bindings.azure.servicebusqueues + version: v1 + metadata: + - name: azureTenantId + value: "***" + - name: azureClientId + value: "***" + - name: azureClientSecret + value: "***" + - name: namespaceName # Required when using Azure Authentication. + value: "" + - name: queueName + value: queue1 + - name: ttlInSeconds + value: 60 +``` + ## Binding support This component supports both **input and output** binding interfaces. diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-eventhubs.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-eventhubs.md index e88f05cbe..9841fb6d8 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-eventhubs.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-eventhubs.md @@ -68,6 +68,45 @@ The above example uses secrets as plain strings. It is recommended to use a secr ### Azure Active Directory (AAD) authentication The Azure Event Hubs pubsub 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 [docs for authenticating to Azure]({{< ref authenticating-azure.md >}}). +#### Example Configuration +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: eventhubs-pubsub + namespace: default +spec: + type: pubsub.azure.eventhubs + version: v1 + metadata: + # Azure Authentication Used + - name: azureTenantId + value: "***" + - name: azureClientId + value: "***" + - name: azureClientSecret + value: "***" + - name: eventHubNamespace + value: "namespace" + - name: enableEntityManagement + value: "false" + ## The following four properties are needed only if enableEntityManagement is set to true + - name: resourceGroupName + value: "test-rg" + - name: subscriptionID + value: "value of Azure subscription ID" + - name: partitionCount + value: "1" + - name: messageRetentionInDays + ## Subscriber attributes + - name: storageAccountName + value: "myeventhubstorage" + - name: storageAccountKey + value: "112233445566778899" + - name: storageContainerName + value: "myeventhubstoragecontainer" +``` + ## Create an Azure Event Hub Follow the instructions [here](https://docs.microsoft.com/azure/event-hubs/event-hubs-create) on setting up Azure Event Hubs. diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus.md index f29bf745e..bd48760da 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus.md @@ -10,6 +10,8 @@ aliases: ## Component format To setup Azure Service Bus pubsub create a component of type `pubsub.azure.servicebus`. See [this guide]({{< ref "howto-publish-subscribe.md#step-1-setup-the-pubsub-component" >}}) on how to create and apply a pubsub configuration. +### Connection String Authentication + ```yaml apiVersion: dapr.io/v1alpha1 kind: Component @@ -20,7 +22,7 @@ spec: type: pubsub.azure.servicebus version: v1 metadata: - - name: connectionString # Required + - name: connectionString # Required when not using Azure Authentication. value: "Endpoint=sb://{ServiceBusNamespace}.servicebus.windows.net/;SharedAccessKeyName={PolicyName};SharedAccessKey={Key};EntityPath={ServiceBus}" # - name: timeoutInSec # Optional # value: 60 @@ -83,10 +85,32 @@ The above example uses secrets as plain strings. It is recommended to use a secr | connectionRecoveryInSec | N |Time in seconds to wait between connection recovery attempts. Defaults: `2` | `2` | publishMaxRetries | N | The max number of retries for when Azure Service Bus responds with "too busy" in order to throttle messages. Defaults: `5` | `5` | publishInitialRetryInternalInMs | N | Time in milliseconds for the initial exponential backoff when Azure Service Bus throttle messages. Defaults: `500` | `500` +| namespaceName| N | Parameter to set the name of the Service Bus namespace. Required if using AAD authentication. | `"namespace"` | ### Azure Active Directory (AAD) authentication The Azure Service Bus pubsub 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 [docs for authenticating to Azure]({{< ref authenticating-azure.md >}}). +#### Example Configuration +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: servicebus-pubsub + namespace: default +spec: + type: pubsub.azure.servicebus + version: v1 + metadata: + - name: namespaceName # Required when using Azure Authentication. + value: "servicebusnamespace" + - name: azureTenantId + value: "***" + - name: azureClientId + value: "***" + - name: azureClientSecret + value: "***" +``` + ## Message metadata 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.