I have planned to delay the processing of messages in queue by following these two links link1 link2. So, as suggested in the link. I have declared the original queue with the x-dead-letter-exchange
and x-dead-letter-routing-key
args. Which published the messages to the so called dead-letter-queue
when message either failed to get processed by consumer or ttl happen or queue length exceed. Now in the dead-letter-queue
similar args have been set along with the ttl
parameter. Which is suppose to republish the messages to the original queue after ttl
exceed. But the problem is it is dropping all the messages.
Moreover, there is a catch here. If i explicitly publish the failed messages from original queue to dead-letter-queue. Then after ttl it republish the messages to the original queue. Why is it so and how do i make it work. So that dead-letter-queue republishes the messages to the original queue instead of dropping. I am using RabbitMQ 3.0.0
.
FYI, I have created both the exchanges of direct
type along with the routing key
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…