Hello Camel Support,

I have a camel route in the application as below:

Route 1:

from(fromUri) .onException(Throwable.class) .handled(true) .end() 
.loadBalance(processor_route1) .to(toUri);

--> processor_route1 in route 1 has the retry/redelivery logic to route 2, in 
case route 2 has any exceptions
--> toUri direct endpoint

Route 2:

from(fromUri) .onException(Exception.class) .handled(true) 
.process(responseProcessor) .end() .process(processor_route2) .to(toUri) 
.process(responseProcessor)

--> fromUri: direct endpoint

Recently I upgraded from Camel 2.x to Camel 3.x. In Camel 2.x above route has 
been working properly. However, in Camel 3.x observing the below error during 
error case in route 2.

During the first execution, route 2 gets executed completely and returns with 
an error from toUri (say endpoint1). Control goes to onException block and 
responseProcessor gets executed.

processor_route1 identifies the error and retries route 2 with a different 
toUri endpoint for route 2 (say endpoint2). During this execution (first retry 
attempt), processor_route2 gets executed but the exchange is not forwarded 
further to endpoint2 and responseProcessor. There are no exceptions also 
captured, so onException does not get executed. Exchange is returned with 
success status to processor_route1 which does not get any information about the 
incomplete route 2 execution.
There have been a lot of changes internal to camel in 3.x version. Can you 
please suggest if there are any changes related to custom redelivery handling 
or any specific camel property to be considered or used in this scenario?
Thanks!

Reply via email to