When messages "disappear" in RabbitMQ, the problem usually comes down to bindings. So for your example to work, I did the following:
2 queues created, living, dead (with TTL and DLX)
Created an exchange called the direct type DIRECT
Created a binding between the "immediate" exchange and the "live" queue with the dead key for the routing key - the reason for this is that the routing key for messages in the dead queue (if the default value is "dead" exchange, this should match the binding to dead letter exchange).
The important part here is the link between the immediate exchange and the busy queue.
To verify that I posted a message in a dead queue, I see that it appears in a dead queue and then appears in a queue.
kzhen
source share