Separate Dead Letter Queue for each Message Consumer in RabbitMq

136 views
Skip to first unread message

soumya sengupta

unread,
Mar 9, 2017, 7:16:25 AM3/9/17
to rabbitmq-users

I have a publish-subscribe scenario built using RabbitMQ. There is an exchange where the messages are being sent by the publisher and any consumer subscribing to that exchange receives those messages in their respective queues. This is a fanout scenario where there is a single producer but multiple consumers.


Now I am willing to integrate a dead letter queue into the system so that the rejected messages can be handled later on. My questions are


1) Should I have a separate dead letter queue configured for each consumer or there should be a single one to handle all rejected messages from all the consumers?

2) If both are possible, which one is better?

3) Since there are multiple parties involved, producer and multiple consumers, who should handle the dead letters. Will it be the producer or each consumer will handle its own dead letter in its own way?

4) Just to confirm dead letter queues should always be configured with consumer queues rather than the producer queue or producer exchange


Soumya

Michael Klishin

unread,
Mar 9, 2017, 7:20:21 AM3/9/17
to rabbitm...@googlegroups.com, soumya sengupta
It depends on your system. If you can't do much about dead lettered messages and there are normally few of them,
so you only want them for logging and similar purposes, I'd use a single queue, at least for starters. This is
a more straightforward option.

If you can re-process them, the number of consumers is predictable and not too high (say, up to several 100s),
possibly one dead lettered message queue per consumer can be justified.
> --
> You received this message because you are subscribed to the Google Groups "rabbitmq-users"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
> To post to this group, send an email to rabbitm...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Reply all
Reply to author
Forward
0 new messages