简体   繁体   English

RabbitMQ Spring AMQP-一段时间后的消息处理

[英]RabbitMQ Spring AMQP - Message Processing after some time

Using Spring AMQP (Using RabbitMQ as message broker), I am preparing a message and I want my message to consume after sometimes. 使用Spring AMQP(将RabbitMQ用作消息代理),我正在准备一条消息,并且有时希望我的消息被使用。 Till then it can wait in some queue like waiting queue and then moved to our main queue where we have the consumer which is waiting to process the message from main queue . 直到那时它可以在诸如等待队列之类的队列中等待 ,然后转移到我们的消费者队列中 ,那里的消费者正在等待处理来自主队列的消息。

I got confused whether I should apply dead letter exchange in this scenario and how to apply the dead letter exchange in it is the big question for me . 我很困惑在这种情况下是否应该进行死信交换,以及如何在其中应用死信交换是我面临的一个大问题

Any Idea how can we make it work. 任何想法我们如何使它起作用。

PS > If it is possible without rabbitmq_delayed_message_exchange plugins. PS>如果没有rabbitmq_delayed_message_exchange插件是可能的。

If you don't want to use the delayed exchange plugin, you can send a message to a queue with a time to live (ttl set on the queue or message). 如果您不想使用延迟交换插件,则可以将消息发送到具有生存时间的队列(在队列或消息上设置了ttl)。

Configure the queue to route expired messages to a dead letter exchange which routes to the final queue. 配置队列以将过期的消息路由到死信交换,该死信交换路由到最终队列。

someExchange -> ttlQueueWithDLX -> DLX -> liveQueue

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM