Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.

How do I retry failed messages forever?

If you want to keep the bad message in the original queue, then you are also blocking the messages that has arrived on the queue after the bad message.

By default Camel will retry consuming a message up til 6 times before its moved to the default dead letter queue.

If you configure the Dead Letter Channel to use maximumRedeliveries = -1 then Camel will retry forever.

When you consume a message you can check the in message header "org.apache.camel.redeliveryCount" that contains the number of times it has been redlivered.

Or "org.apache.camel.Redelivered" that contains a boolean if its redelivered or if its the first time the message is processed.

© 2004-2015 The Apache Software Foundation.
Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram