AOP
Available as of Camel 2.0
Camel has a AOP concept in the DSL allowing you do do some custom before and/or after processing when routing an Exchange.
It replaces the intercept
from Camel 1.x that was more limited as it could was a fix around a single processor.
This new AOP can span multiple processors (nodes in the route graph) and it uses endpoint URI to allow invoking any kind of Camel component.
The AOP supports the following callbacks in which you can use 1..n free of choice:
- before
- after
- afterFinally
The difference between after
and afterFinally
is that afterFinally
is invoked from a finally block so it will always be invoked no matter what, eg also in case of an exception occur.