On Wed, Apr 18, 2012 at 9:07 PM, ychawla <premiergenerat...@yahoo.com> wrote:
> Hello All,
> Consider a simple recipient list:
>
> <camel:recipientList delimiter="," parallelProcessing="false"
> onPrepareRef="prepareMessage">
>                                
> <camel:header>RecipientListHeader</camel:header>
> </camel:recipientList>
>
> The Recipient List header has the contents: endpoint1, endpoint2
>
> The endpoints are defined as:
>
> <endpoint id="endpoint1" uri="direct:a"/>
> <endpoint id="endpoint2" uri="direct:b"/>
>
> In my 'prepareMessage' processor, I want to access the endpoint that I am
> calling.  This is because I want to enrich this endpoint dynamically with
> headers for example operationName and operationNamespace.
>
> In the exchange properties, I can see 'direct:a' but not 'endpoint1'.  Is
> there a way I can access the endpoint name rather than the endpoint URI in
> the OnPrepareRef processor?
>

Just access the RecipientListHeader header from the OnPrepareRef processor

Something a like:

Object value = exchange.getIn().getHeader("RecipientListHeader");


> Thanks,
> Yogesh
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Retrieve-Endpoint-in-Recipient-List-OnPrepareRef-tp5649956p5649956.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cib...@fusesource.com
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