camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Get routeId from Exchange / in Processor
Date Mon, 26 Mar 2012 09:24:16 GMT

The Exchange itself has a getFromRouteId which returns the id of the
route, that created the exchange.

If you pass the exchange in multiple routes, you can get the current
route via UnitOfWork -> getRouteContext -> Route -> Id.
You can get the UoW from the exchange.

This is likely to be improved in Camel 3.x as we will do some internal
cleanup and optimizations.
And the "message history" pattern is something I would like to get
easier and cleaner. Currently the data is a bit scattered.

On Mon, Mar 26, 2012 at 11:14 AM, Alex Anderson <> wrote:
> Is it possible to get the ID of the current route from an Exchange, or
> to have the routeId provided to a processor/beanRef method as an
> argument?

Claus Ibsen
CamelOne 2012 Conference, May 15-16, 2012:
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message