camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From murugess <>
Subject How to break from routing slip in camel on exception?
Date Tue, 01 Dec 2009 17:04:20 GMT

We are using camel binding component, with camel version, on
servicemix for our project. We are leveraging dynamic routing slip in camel
to process our request and are facing issues related to exception handling.
We have already defined global errorHandler which handles any exception that
occurs in any of the route. Now, whenever an exception occurs in any of the
endpoints within routing slip, exception handler is called as expected but
then once the exceptionHandler route is finished, control comes back to the
routingslip and rest of the endpoints get executed. No matter what we set on
exception route ( such as handled=false), all the endpoints in routing slip
eventually gets called. Here is the code snippet from RoutingSlip :

 for (String nextRecipient : recipients) {
            Endpoint<Exchange> endpoint = resolveEndpoint(exchange,
            Producer<Exchange> producer =
            Exchange ex = current.newInstance();

            copyOutToIn(ex, current);


            current = ex;

    We don't see any provision to break from the above loop. Right now, the
work around we have adopted is to set EXCEPTION_HANDLED_PROPERTY on the
exchange so that the pipeline class does not delegate the request to the
actual endpoint. But there is still an overhead of pipeline being called for
all the endpoints configured within the routing slip.

    Any suggestions are welcome.
View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message