DefaultErrorHandler (and so the
TransactedErrorHandler) supports a redelivery mechanism that you can configure via a redelivery policy.
For instance, the following Blueprint XML creates a Camel route that systematically throws an
Booooommmmm message). As we don't explicitly define an error handler, the route uses the
DefaultErrorHandler. We just configure the redelivery policy of the
DefaultErrorHandler, trying to redeliver the message three times, waiting two seconds between each attempt. If it still fails at the fourth attempt, the exchange ends and the exception is sent to the caller.
<?xml version="1.0" encoding="UTF-8"?> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> <bean...