1

I'm currently working on an application which uses Camel heavily. I'll briefly explain what I'm trying to achieve:

An OnException Processor (handled=true) catches an Exception and when that happens I want to stop the Exchange from being processed by the RoutePolicy(s) of the route. Example with pseudo-code:

<route id="route1" routePolicyRef="policy1, policy2, policy3">
    ... an exception *e1* is thrown... 
</route>

<onException>
    <handled>true</handled>
    ... handle exception *e1*
    <bean ref="customExceptionProcessor"/>
</onException>

So in essence, once an Exception is handled I want the Exchange to stop propagating to all the attached Policy(s).

Wondering if there's a simple way to achieve this which I may have missed when reading from the documentation.

That's it really. Cheers.

Ivo
  • 450
  • 3
  • 18
  • 2
    Are you ok with the propagation stopping completely? That is, the exchange stops. In that case try . – Souciance Eqdam Rashti Aug 24 '16 at 07:38
  • Hi Souciance, I should have mentioned I have tried that already although making use of the exchange.setProperty(Exchange.ROUTE_STOP, true). I'll try straight in the spring dsl after my processor finishes. – Ivo Aug 24 '16 at 20:37

0 Answers0