camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Getting the last used endpoint
Date Thu, 02 Feb 2012 10:05:08 GMT
The exchange property with the key Exchange.TO_ENDPOINT has the
endpoint where the message was send.
But notice that this value will be overridden during routing. The
current value is for the last endpoint where the message was sent.

On Thu, Feb 2, 2012 at 9:49 AM, Fitzcaraldo
<> wrote:
> I am writing an audit bean that will write the payload to a JMS queue after
> attaching some metadata as headers to the message eg
> from("jms:queue:in).bean(Audit.class)
> .to(..)
> .to(...)
> ..
> .to("jms:queue:out").bean(Audit.class);
> The metadata I want include context, routeID, source endpoint, source
> payload, target endpoint, target payload, among others.
> What I can't figure out is how to determine the most recently used endpoint
> inside the bean (eg jms:queue:out in the above).
> The context has getEndpoints() returning a list of all Endpoints in the
> context but I cannot work out which was the last used.
> Is there a way?
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message