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
<[email protected]> 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: 
> http://camel.465427.n5.nabble.com/Getting-the-last-used-endpoint-tp5450039p5450039.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to