why, yes it is possible :)

You can use an xpath expression to get the value of the node you
like.. then use a recipient list or dynamic router to get it to the
queue/topic you like:

http://camel.apache.org/recipient-list.html


On Mon, Mar 31, 2014 at 2:33 PM, mtod09 <m...@thetods.net> wrote:
> I would like to perform a Camel route based on an xpath value in an XML
> message.
>
> The XML Message example:
>
> <xmlMessage>
>         <header>
>                 <version>1</version>
>                 <msgType>Event</msgType>
>                 <source>App1<source>
>                 <route>topic.A</route>
>                 <destination>AppA</destination>
>         </header>
>         <payload/>
> </xmlMessage>
>
> ActiveMQ example:
>
> <camelContext id="TrackingRoute"
> xmlns="http://camel.apache.org/schema/spring";>
>         <route>
>                 <from uri="activemq:queue:queue.incoming"/>
>                 <filter>
>                         <to uri="activemq:topic:topic.${topicUri}"/>
>                 </filter>
>     </route>
> </camelContext>
>
> Is it possible to query the XML using an xpath expression to return the
> destination value to a variable then use that to define the to uri?
>
> Thanks
>
> Mike
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-routing-based-on-an-xpath-value-in-an-XML-message-tp5749578.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta

Reply via email to