0
votes

Using Spring AMQP (Using RabbitMQ as message broker), I am preparing a message and I want my message to consume after sometimes. 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.

P.S > If it is possible without rabbitmq_delayed_message_exchange plugins.

1

1 Answers

1
votes

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).

Configure the queue to route expired messages to a dead letter exchange which routes to the final queue.

someExchange -> ttlQueueWithDLX -> DLX -> liveQueue