Skip to content

Commit 100388b

Browse files
authored
Merge pull request #4174 from TomasEkeli/patch-1
The Azure ServiceBus Queue -name must match the Dapr pubsub topic
2 parents 83b9a02 + 27a8592 commit 100388b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-queues.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,23 @@ When subscribing to a topic, you can configure `bulkSubscribe` options. Refer to
181181

182182
Follow the instructions [here](https://learn.microsoft.com/azure/service-bus-messaging/service-bus-quickstart-portal) on setting up Azure Service Bus Queues.
183183

184+
{{% alert title="Note" color="primary" %}}
185+
Your queue must have the same name as the topic you are publishing to with Dapr. For example, if you are publishing to the pub/sub `"myPubsub"` on the topic `"orders"`, your queue must be named `"orders"`.
186+
If you are using a shared access policy to connect to the queue, that policy must be able to "manage" the queue. To work with a dead-letter queue, the policy must live on the Service Bus Namespace that contains both the main queue and the dead-letter queue.
187+
{{% /alert %}}
188+
189+
### Retry policy and dead-letter queues
190+
191+
By default, an Azure Service Bus Queue has a dead-letter queue. The messages are retried the amount given for `maxDeliveryCount`. The default `maxDeliveryCount` value defaults to 10, but can be set up to 2000. These retries happen very rapidly and the message is put in the dead-letter queue if no success is returned.
192+
193+
Dapr Pub/sub offers its own dead-letter queue concept that lets you control the retry policy and subscribe to the dead-letter queue through Dapr.
194+
1. Set up a separate queue as that dead-letter queue in the Azure Service Bus namespace, and a resilience policy that defines how to retry.
195+
1. Subscribe to the topic to get the failed messages and deal with them.
196+
197+
For example, setting up a dead-letter queue `orders-dlq` in the subscription and a resiliency policy lets you subscribe to the topic `orders-dlq` to handle failed messages.
198+
199+
For more details on setting up dead-letter queues, see the [dead-letter article]({{< ref pubsub-deadletter >}}).
200+
184201
## Related links
185202

186203
- [Basic schema for a Dapr component]({{< ref component-schema >}})

0 commit comments

Comments
 (0)