You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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

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

And in XML

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

See more details at Error Handler.

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

Error formatting macro: snippet: java.lang.NullPointerException

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

Error formatting macro: snippet: java.lang.NullPointerException

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

Error formatting macro: snippet: java.lang.NullPointerException

See Also

  • No labels