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
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