0

私は次の構成を持っています

{"rabbit_version":"3.4.3",

...

"queues":[
    {"name":"consumer.queue-dl","vhost":"dev","durable":true,"auto_delete":false,"arguments":{}},
    {"name":"consumer.queue","vhost":"dev","durable":true,"auto_delete":false,"arguments":{"x-message-ttl":1000,"x-dead-letter-exchange":"consumer.exchange-dl"}},
    {"name":"another-queue", "vhost":"dev","durable":true,"auto_delete":false,"arguments":{"x-message-ttl":1000,"x-dead-letter-exchange":"consumer.exchange-dl"}},
],

"exchanges":[
    {"name":"consumer.exchange-dl","vhost":"dev","type":"direct","durable":true,"auto_delete":false,"internal":false,"arguments":{}},
    {"name":"consumer.exchange","vhost":"dev","type":"topic","durable":true,"auto_delete":false,"internal":false,"arguments":{}},
    {"name":"another-exchange","vhost":"dev","type":"direct","durable":true,"auto_delete":false,"internal":false,"arguments":{}}
],

"bindings":[
    {"source":"consumer.exchange-dl","vhost":"dev","destination":"consumer.queue-dl","destination_type":"queue","routing_key":"","arguments":{}},
    {"source":"consumer.exchange-dl","vhost":"dev","destination":"consumer.queue-dl","destination_type":"queue","routing_key":"#","arguments":{}},
    {"source":"consumer.exchange","vhost":"dev","destination":"consumer.queue","destination_type":"queue","routing_key":"consumer.topic2","arguments":{}},
    {"source":"another-exchange","vhost":"dev","destination":"another-queue","destination_type":"queue","routing_key":"","arguments":{}}
]}

anoter-queueconsumer.queueに DLX を設定して、メッセージが1 秒後にconsumer.exchange-dlに移動されるようにしました。

another-exchange (直接)にバインドされているanother-queueでは、すべてが正常に機能します。consumer.exchange (トピック)に送信されたメッセージは DLX に移動されません。DLX のルーティング キー バインディングを試してみましたが、何も機能しませんでした。トピック交換のための DLX に関する落とし穴はありますか?

ありがとう

4

1 に答える 1

0

コンシューマーの DL キューへの DLX でのバインディングをもう 1 つ作成する問題を解決しました。

于 2015-02-24T16:38:49.800 に答える