THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
You can handle errors in a number of ways such as:
- by specifying an Error Handler
- using the Exception Clause via the exception() method
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");
|
...