camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bocamel <>
Subject RE: How to return early from a direct: subroute?
Date Sun, 03 Apr 2016 02:40:20 GMT


Thank you very much for your response.  I think your suggestion is very
interesting, though it was not exactly what I was looking for. 


Conceptually, to me, a direct: route is just a method call.  But I cannot
find an easy way to exit/return from such a method before it reaches its
end.  While one might be able to use a dynamic router with slip returning a
null value to fake this, it is not very straightforward.  I wish there is an
exchange property ROUTE_RETURN that simply causes the exchange to exit the
current route and returns to the parent route if it has a parent route.


Thanks again!


From: taariq [via Camel] [] 
Sent: Friday, April 1, 2016 3:36 PM
To: bocamel <>
Subject: Re: How to return early from a direct: subroute?


Did you already look at the dynamic router and routing slip patterns? 

> On 01 Apr 2016, at 17:12, bocamel <[hidden email]> wrote: 
> I have two routes: 
> <route id="route1"> 
>  <from .../> 
>  <to uri="direct:foo"/> 
>  <to uri=.../> 
> </route> 
> <route id="route2"> 
>  <from uri="direct:foo"/> 
>  <process ref="proc1"/> 
>  <process ref="proc2"/> 
> </route> 
> What should I do if, in proc1, I want to - for certain exchanges - return 
> back to route1 without completing the entire route2?  I know the
> property, but that would stop the exchange completely (without going back
> route1).  I can also set some header(s) and then use <choice> in the
> to achieve it.  But I wonder if there is something analogous to ROUTE_STOP

> but more functions like ROUTE_RETURN. 
> Any help would be greatly appreciated. 
> -- 
> View this message in context:
> Sent from the Camel - Users mailing list archive at 



If you reply to this email, your message will be added to the discussion

To unsubscribe from How to return early from a direct: subroute?, click here
> .
ils%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> NAML 

View this message in context:
Sent from the Camel - Users mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message