[rabbitmq-discuss] Routing through multiple dead-letter exchanges

reaperman123456789 at gmail.com reaperman123456789 at gmail.com
Tue Aug 20 16:12:48 BST 2013


This is my setup:

I have an exchange named "live" with a queue named "livequeue" bound to it 
by routing key "msg", and another exchange named "deferred" with a queue 
named "deferredqueue" bound to it, also with routing key "msg".
"livequeue" has set the exchange "deferred" as dead-letter exchange and 
"msg" as dead-letter routing key, and "deferredqueue" has set a message TTL 
of 5 minutes, "live" as dead-letter exchange and "msg" as dead-letter 
routing key.
Messages are initially published to exchange "live" with routing key "msg" 
by a publisher, so they end up in queue "livequeue". Consumers will read 
from "livequeue" and either process and ack the message, or if they can't 
process it right away, reject it with requeue set to false. On rejection, 
the message will move to "deferredqueue" through the dead-letter exchange 
of "livequeue".
Everything works as expected up to this point. However, when the message 
TTL of "deferredqueue" is up, I expected the message to reappear again in 
"livequeue" via the dead-letter exchange of "deferredqueue", but the 
message is dropped instead.
If, however, I ack the message in "livequeue" and publish it to 
"deferredqueue" using basic_publish, instead of rejecting it, the message *
does* reappear in "livequeue"  after the TTL is over, as expected.

So my question is, is this the normal (intended) behavior, or am I doing 
something wrong? If this is the normal behavior, is there a way to change 
it by some exchange/queue/message property, so it will work as I initially 
planned?
This is *not* a request to change anything in RabbitMQ or AMQP, I just want 
to know how to handle this kind of thing properly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130820/15e03a4f/attachment.htm>


More information about the rabbitmq-discuss mailing list