avs099
avs099

Reputation: 11227

Azure Service Bus: 1 client -> 1 queue approach - how to manage dead-letter queues?

In my messaging app I decided to allocate an individual queue for a client. This way routing and security are quite easy. But I can't figure out how to deal with dead-letter queues then (when message expires, let's say). I want to use serverless approach with Azure functions to handle messages from DLQ. It's easy to setup to trigger a function when a message gets placed in a queue. But if I have 1000 clients, that would require 1000 functions?.. From what I can see you can attach a function to a single "trigger" - meaning single queue. Am I missing something here? what's the right approach to uniformly deal with DLQ messages?

Any help is appreciated. Thank you.

Upvotes: 0

Views: 110

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136196

If your concern is how to deal with thousands of DLQs, one possible solution would be to configure your queues and set ForwardDeadLetteredMessagesTo property in each of the queue to point to another queue.

That way the dead-lettered messages from all the queues will go in a single queue and you can attach a Function to that queue for processing of such messages.

Upvotes: 2

Related Questions