Reputation: 40588
Background
We consume messages from RabbitMQ with Langohr (version 3.4.0) and try to persist them into MongoDB. We're not using auto-ack
since if we fail to persist the messages in MongoDB we want to be able to retry later. We're using the ack-unless-exception
function to accommodate this. Tonight MongoDB had a temporary disruption and was down for a short period of time during which 40 messages couldn't be persisted and were thus retained in the RabbitMQ queue. But when MongoDB came back up again our Langohr handler just received new messages. The old ones were not delivered to us before we did a restart of our application.
Question
How can we make RabbitMQ redeliver the previous nack:ed messages with Langohr without having to restart our application?
Upvotes: 2
Views: 168