...
Code Block | ||||
---|---|---|---|---|
| ||||
onException(ValidationException.class). to("activemq:validationFailed"); onException(ShipOrderException.class). to("activemq:shipFailed"); from("seda:order").to("bean:processOrder"); |
Number of features depend on Error Handler being used
The Exception Clause supports a wide range of features, that are dependent on the Error Handler used. For instance Dead Letter Channel supports it all, where as the DefaultErrorHandler and TransactionErrorHandler doe not support anything related to redelivery.
Here is a breakdown of which features is supported by the Error Handler(s):
Feature | Supported by the following Error Handler |
---|---|
all scopes | DefaultErrorHandler, TransactionErrorHandler, Dead Letter Channel |
onException | DefaultErrorHandler, TransactionErrorHandler, Dead Letter Channel |
onWhen | DefaultErrorHandler, TransactionErrorHandler, Dead Letter Channel |
handled | DefaultErrorHandler, TransactionErrorHandler, Dead Letter Channel |
Custom ExceptionPolicy | DefaultErrorHandler, TransactionErrorHandler, Dead Letter Channel |
useOriginalBody | |
redeliverUntil | |
onRedelivery | |
dead letter queue |
Scopes
Exception clauses is scoped as either:
...