Error handler features
Basically, all error handlers extend the DefaultErrorHandler
. The DefaultErrorHandler
provides a set of interesting features allowing you to use very fine-grained management of the exceptions.
Redelivery
The DefaultErrorHandler
(and so the DeadLetterErrorHandler
and 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 IllegalArgumentException
(with 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 ...
Get Mastering Apache Camel now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.