Interface ErrorHandlerFactory


public interface ErrorHandlerFactory
Factory that creates and configures an error handler for a Route.

Each route gets its own private error handler instance to avoid cross-route interference. The factory is therefore cloned once per route via cloneBuilder() before the route is started. The resulting ErrorHandler wraps every Processor in the route's pipeline and intercepts any exception thrown during processing, applying the configured retry, redelivery, and dead-letter-channel policies.

Built-in implementations include the default error handler, the dead letter channel, and the no-error-handler (a pass-through). Route configurations can override the factory used for a set of routes via RouteConfigurationsBuilder.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Clones this factory so each route has its private builder to use, to avoid changes from one route to influence the others.
    boolean
    Whether this error handler supports transacted exchanges.
  • Method Details

    • supportTransacted

      boolean supportTransacted()
      Whether this error handler supports transacted exchanges.
    • cloneBuilder

      ErrorHandlerFactory cloneBuilder()
      Clones this factory so each route has its private builder to use, to avoid changes from one route to influence the others.

      This is needed by the current Camel route architecture

      Returns:
      a clone of this factory