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.

RedeliveryPolicy

A redelivery policy defines rules when Camel Error Handler perform redelivery attempts. For example you can setup rules that state how many times to try redelivery, and the delay in between attempts, and so forth.

You can use redelivery policies at two places in Camel:

For example you can define a default error handler to redelivery at most 3 times

java errorHandler(defaultErrorHandler().maximumRedeliveries(3));

And in XML

xml <errorHandler id="defaultEH"> <redeliveryPolicy maximumRedeliveries="3"/> </errorHandler>

See more details at Error Handler.

Extensive coverage

The Camel Error Handler is covered in great details in the Camel in Action book where the entire chapter 5 has been devoted.

Using RedeliveryPolicyProfiles

Available as of Camel 2.7

In the XML snippet below we have defined a <redeliveryPolicyProfile> which we can refer to from the <errorHandler>.

{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringErrorHandlerRedeliveryPolicyProfileTest.xml}

Camel's Properties placeholder is also supported which the following XML example shows:

{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponentOnExceptionRefTest.xml}

And you can also use Spring Frameworks property placeholders as shown below:

{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertyPlaceholderOnExceptionRefTest.xml}

See Also

© 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