Dead letter exchange RabbitMQ dropping messages

白昼怎懂夜的黑 提交于 2019-12-05 04:54:59

When messages 'disappear' in RabbitMQ the problem is usually down to the bindings. So, to get your example working I did the following:

  1. Created 2 queues, alive, dead (with the TTL and DLX)

  2. Created an exchange called immediate of type DIRECT

  3. Created a binding between the exchange "immediate" and the queue "alive" with a routing key "dead" - the reason for this is because, the routing key for messages into the dead queue (if using the default exchange is 'dead' this needs to match in the binding on the dead letter exchange).

The important part here is in the binding between the immediate exchange and the alive queue.

To test I published a message into the dead queue, I can see it appear in the dead queue briefly then appear in the alive queue.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!