camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SteveSmall <>
Subject Re: Issue with doTry/doCatch not routing correctly
Date Tue, 02 Oct 2012 21:06:26 GMT

The "direct:routeA" route has a dynamic router (java bean) in it which
directs to another route based on the exchange context:

<camel:route id="xyz">
    <camel:from uri="direct:routeA"/>
    <camel:inOnly uri="bean:dynamicBeanRouter"/>

This dynamic router simply constructs "direct://routeName" where "routeName"
is dynamically calculated.

When an exception is encountered in the route that the dynamic router sends
to, the doCatch block previously mentioned does not catch it. Instead, the
Exchange.REDELIVERY_EXHAUSTED property gets set which seems to kill the
routing from having it send to "routeB".

If I remove the dynamic router, the catch block works just fine. This is not
an option for me though.

In 2.8.3 the Exchange.REDELIVERY_EXHAUSTED property is not being set even
when using the dynamic router.

I seem to have tracked it down to the MulticastProcessor in 2.10.1 with the
following method on line 746:

The "exhaust" property is true is both versions. However in camel 2.8.3, the
"original.getException()" call returns null. In 2.10.1 it returns the
exception thrown in the dynamic router's destination.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message