Camel spring routing:

I'm trying to route a message depending on the content of an element. e.g.
for elements "aaaa_test1"/"aaaa_test2"/"bbbb_test"/"cccc_test" I want to say
- if the first 4 characters are "aaaa" route to queue 1, "bbbb" route to
queue 2, etc.

I know I can do a direct comparison (e.g. <xpath>/root/element =
'aaaa_test1'</xpath> ) but want to make it more flexible. Ideally I want to
acheive the following:

<choice>
    <when>
    <xpath>/root/element *LIKE *'aaaa'</xpath>
        <inOnly uri="activemq:queue1"/>
    </when>
    <xpath>/root/element *LIKE *'bbbb'</xpath>
        <inOnly uri="activemq:queue2"/>
    </when>
    <otherwise>
        <inOnly uri="activemq:queue3"/>
    </otherwise>
</choice>


Anyone know how to do this?

thanks.

--
View this message in context: 
http://camel.465427.n5.nabble.com/spring-xpath-message-router-tp5715114.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to