Hi

You can get the information from the exchange being routed. It has API
to get that.

Something along the lines of:
   exchange.getUnitOfWork().getRouteContext().getRoute().getId();

There is also a getFromRouteId() on exchange but its the first route
(eg original route where the exchange was created)


On Thu, Jan 30, 2014 at 5:45 PM, RobO <[email protected]> wrote:
> Hi,
> I have a custom camel component I've written which connects to another
> server. I'd like to be able to suspend the route which called this component
> if the connection attempt fails.
>
> How can I obtain the currently executing routeid from the component so that
> I can suspend the route?
>
> I am currently using Camel v2.12.1
>
> Thanks,
> Rob
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Obtain-current-route-from-custom-component-tp5746629.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Reply via email to