Bilgin,
Not sure why moving the onException to global wouldn't work for you.
The error handler checks local scope and global scope to find an
appropriate exception handler.
It works on the latest master here:
https://github.com/christian-posta/camel-sandbox/blob/master/camel-snapshot/src/test/ja
Thanks for the insight guys.
@Christian moving onException to context is not solving it, as in this case
the errorHandler is not doing reties!
My final goal is simple:
Let the second route to retry 3 times, and if it fails propagate back.
Then route one sends an error message (mock:exceptionFound
Yes the 2nd route handles the error, and so when the messages returns
to route 1, it has already been handled by an error handler, and is
not handled again. This is by design.
Also avoids endless error handling etc.
You can set the 2nd route to have no error handler, or call the 2nd
route in a do
Maybe someone else can explain the reasoning for this behavior, but what's
happening is:
your errorHandler is handling the exception in route 2, but it doesn't see
any exception handlers (none declared on the immediate route, and none
globally defined).
so it just tries redelivery, marks it as "F