Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Azure ServiceBus Queue -name must match the Dapr pubsub topic #4174

Merged
merged 12 commits into from
Jul 15, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,17 @@ When subscribing to a topic, you can configure `bulkSubscribe` options. Refer to

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

{{% alert title="Note" color="primary" %}}
Your queue must have the same name as the Topic you are publishing to with Dapr. E.g. if you are publishing to the pubsb "myPubsub" on the topic "orders" your queue must be named "orders".
TomasEkeli marked this conversation as resolved.
Show resolved Hide resolved
If you are using a Shared access policy to connect to the queue that policy must have the ability 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.
TomasEkeli marked this conversation as resolved.
Show resolved Hide resolved
{{% /alert %}}

### Retry policy and dead-letter queues

An Azure ServiceBus Queue has a dead-letter queue by default. By default the messages are retried the "Max delivery count" number of times (defaults to 10, 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.
TomasEkeli marked this conversation as resolved.
Show resolved Hide resolved

Dapr Pubsub has its own dead-letter queue -concept you can use instead. This lets you control the retry-policy and you can subscribe to the dead-letter queue through Dapr. Set up a separate queue as that dead-letter queue in the Azure Service Bus Namespace, and a resilience component that defines how to retry. You can subscribe to that (topic) to get the failed messages and deal with them. E.g. setting up a dead-letter queue `orders-dlq` in the subscription and a resilience lets your subscribe to the topic `orders-dlq` to handle failed messages.
TomasEkeli marked this conversation as resolved.
Show resolved Hide resolved

## Related links

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