Spring amqp with RabbitMq: message is not circled back in real time queue after the dead letter queue falls

I am trying to achieve this . There are so many conflicting answers to know if this is possible or not.

According to the previous link, this is not possible. But in another question on this forum, someone noticed that they can here and in the comments section here ,

So is it possible to do live queue => dead-letter-queue => live queue

Or do I need to use a specific version of RabbitMq for this?

I can do: live queue => dead-letter-queue and dead-letter-queue => live queue.

+1
source share
1 answer

You cannot do this if the dead inscription alivemust expire - according to the documentation ...

You can create a dead letter queue loop. For example, this can happen when the dead letter messages are queued for exchange by default without specifying a dead letter routing key. Messages in such cycles (i.e. Messages that reach the same queue twice) will be deleted if the entire cycle is associated with the expiration of the message .

(my emphasis).

I just checked a test where a dead letter from is alivecaused by a failure and it works fine; after several loops, the header x-deathlooks like this:

reason: rejected
queue:  alive
time:   1419448981
exchange:   req
routing-keys:   alive

reason: expired
queue:  dead
time:   1419448981
exchange:   dlx
routing-keys:   alive

reason: rejected
queue:  alive
time:   1419448976
exchange:   req
routing-keys:   alive

reason: expired
queue:  dead
time:   1419448976
exchange:   dlx
routing-keys:   alive

...

, Spring AMQP defaultRequeueRejected false.

+2

All Articles