Versions Compared

Key

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

...

You can handle errors in a number of ways such as:

Camel uses a strategy to resolve how exceptions should be handled.

Using Interceptors

You can register interceptors on a RouteBuilder so that they are inherited by all child routes. You can also use the DSL itself to write interceptors...

Code Block
// lets log all steps in all routes
intercept().to("log:foo").proceed();

from("seda:foo").to("seda:bar");

...

Code Block
// lets log messages from gold customers
intercept(xpath("/customer[@type='gold']").to("log:customer").proceed();

from("seda:foo").to("seda:bar");

...