Versions Compared

Key

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

...

Some current implementations include

Non transacted

  • DefaultErrorHandler is the default error handler in Camel 2.0 onwards. This error handler does not support a deal letter queue, it will propagate exceptions back to the caller, as if there where no error handler at all. It has a limited set of features.
  • Dead Letter Channel which supports attempting to redeliver the message exchange a number of times before sending it to a dead letter endpoint
  • LoggingErrorHandler for just catching and logging exceptions
  • NoErrorHandler for no error handling

Transacted

  • TransactionErrorHandler is the default error handler in Camel 2.0 onwards for transacted routes. This error handler does not support a deal letter queue, it will propagate exceptions back to the caller, as if there where no error handler at all. It has a limited set of features.
  • Transaction for transactional error handling (Spring based). See the Transactional Client EIP pattern.

...

Code Block
errorHandler(noErrorHandler());

TransactionErrorHandler new in Camel 2.0

The TransactionErrorHandler is the new default error handler in Camel 2.0 for transacted routes. It only supports a limited set of features such as catching exception and using the Exception Clause. It does not support redelivery, delays or the likes. It will propagate exceptions back to the original caller. It does not have any dead letter queue.

Scopes

The error handler is scoped as either

  • global
  • per route specificor policy based (this applies for transactional exchanges only)

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

...