RabbitMQ dead letter exchange never getting messages

前端 未结 7 943
陌清茗
陌清茗 2020-12-12 13:08

I\'m trying to setup my first RabbitMQ dead letter exchange, here are the steps I\'m using through the web admin interface:

  1. Create new DIRECT exchange with the
相关标签:
7条回答
  • 2020-12-12 13:44

    Gentilissimo Signore was kind enough to answer my question on Twitter. The problem is that if your dead letter exchange is setup as DIRECT you must specify a dead letter routing key. If you just want all your NACKed message to go into a dead letter bucket for later investigation (as I do) then your dead letter exchange should be setup as a FANOUT.

    Here are the updated steps that work:

    1. Create new FANOUT exchange with the name "dead.letter.test"
    2. Create new queue "dead.letter.queue"
    3. Bind "dead.letter.queue" to "dead.letter.test"
    4. Create new queue "test1" with the dead letter exchange set to "dead.letter.test"
    5. Send a message into "test1"
    6. Nack (with requeue = false) the message in "test1"
    0 讨论(0)
提交回复
热议问题