...
At current time you can advice an existing route by adding interceptors Intercept, onException Exception Clause etc. which then will apply for the route being advice.
For example in the route below we intercept sending a message to the mock:foo
endpoint and detour the message.
TODO: e1
Wiki Markup |
---|
{snippet:id=e1|lang=java|url=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/AdviceWithTest.java} |
At current time you cannot alter the route by adding or changing exiting nodes in the route path. In the future we may want to introduce a special AdviceRouteBuilder
which has special builder methods for altering the route etc.