Search code examples
javarabbitmqapache-camelspring-rabbitspring-camel

Avoid camel from sending messages to queue when RabbitMQ is down


I am fairly new to RabbitMQ and Apache-Camel. Messages are bing picked off an interface (IMAP, etc) and sent to a queue for further processing. I am struggling to find a solution to avoid messages being lost in a scenario when RabbitMQ is down. What would be the best solution to avoid messages being sent to a queue by a camel route?

I use Spring DSL with camel version 2.25.1.

Thanks in advannce.


Solution

  • You can write failed messages on a file. And can have another route to read from file and send to queue. Which you should be able to start on demand (after making sure your jms broker is up and running)