Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Setting global error handlers

The following example shows how you can register a global error handler (in this case using the logging handler)

Wiki Markup
{snippet:id=e1|lang=java|url=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java}

Setting error handlers on a specific route

The following example shows how you can register a local error handler (in this case using the logging handler)

Wiki Markup
{snippet:id=e2|lang=java|url=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java}

Default Error Handler

The default error handler is the Dead Letter Channel which is automatically configured for you. You can then configure the specific dead letter endpoint to use either for an entire rule base or a specific rule as shown above.