I think your xpath is wrong, try: /Header1/Dest/text()
The easiest way to diagnose issues like these is split into two steps.
First store the value from the xpath in a header and then pass the header
to recipient list. That will allow you to use tracer to follow the flow.



*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Tue, Apr 1, 2014 at 9:05 AM, mtod09 <m...@thetods.net> wrote:

> I'm having a problem getting the value from the Dest Element and using it
> in
> the recipient list.
> I don't get any errors but the message does not show up in the topics.
>
> I'm using an input queue "activemq:queue:queue.ESB.incoming" then it should
> route to 2 topics based on the Dest values.
>
> XML Message example:
>
> <FMIMessage version="1.0" MsgID="1804343574">
>         <Header1>
>                 <Source>Pipeline</Source>
>                 <AppVersion>1.1</AppVersion>
>                 <Dest>topic:trftracking, topic:test</Dest>
>         </Header1>
>         <Event/>
> </FMTMessage>
>
>
> ActiveMQ.xml :
>
> <camelContext id="TrackingRoute"
> xmlns="http://camel.apache.org/schema/spring";>
>         <route>
>                 <from uri="activemq:queue:queue.ESB.incoming"/>
>                 <recipientList delimiter=",">
>                         <xpath>/Header1/Dest</xpath>
>                 </recipientList>
>         </route>
> </camelContext>
>
> Note: I'm using ActiveMQ 5.9
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-routing-based-on-an-xpath-value-in-an-XML-message-tp5749578p5749629.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to