Hi,
I'm using camel as distributed with apachemq, sorry if this turns
out to be an activemq problem.
activemq 5.3.2 shipped with camel 2.0 (as far as I can tell)
activemq 5.4 uses 2.4.0
A route that used to work for me in 2.0 doesn't any more:
<route autoStartup="true" inheritErrorHandler="true" id="SCIFglue5"
xmlns:ns2="http://camel.apache.org/schema/web"
xmlns="http://camel.apache.org/schema/spring">
<from uri="activemq:test_in"/>
<choice inheritErrorHandler="true" id="choice2">
<when inheritErrorHandler="true">
<header>$foo = 'true'</header>
<to uri="activemq:test_out_true" inheritErrorHandler="true"
id="to6"/>
</when>
<otherwise inheritErrorHandler="true">
<to uri="activemq:test_out_other"
inheritErrorHandler="true" id="to7"/>
</otherwise>
</choice>
</route>
[this was created in the console]
It picks up from test_in, but I get this error in the activemq log:
2010-09-18 01:59:36,205 | ERROR | Failed delivery for exchangeId:
ID:vaio-51221-1284757417176-5:22:-1:1:1. Exhausted after delivery
attempt: 1 caught: org.apache.camel.builder.xml.InvalidXPathExpression:
Invalid xpath: $foo = 'true'.
I know that "$foo = 'true'" isn't valid xpath, but isn't it camel's
way of matching message headers? It worked in the version shipping
with 5.3.x and I'm following the docs here:
http://camel.apache.org/content-based-router.html
http://camel.apache.org/xpath.html
--
Illtud Daniel illtud.dan...@llgc.org.uk
Prif Swyddog Technegol Chief Technical Officer
Llyfrgell Genedlaethol Cymru National Library of Wales