On Wed, Aug 10, 2011 at 3:10 PM, baklarz <tdrobiszew...@gmail.com> wrote: > Hi, I want to use this: > http://camel.apache.org/message-router.html > http://camel.apache.org/simple.html > > <route> > <from uri="activemq:queue:Notification.EndDonationSuccessEvent" > /> > <bean ref="mailNotificationTranslator" > method="prepareOrganizationNotification" /> > <choice> > <when> > <simple>'tom...@example.com'!= ${body[sendTo]}</simple> > <to uri="activemq:queue:MAIL_NOTIFICATIONS" /> > </when> > </choice> > </route> > > In message body is HashMap with key 'sendTo'. I want to route all messages > except those to tom...@example.com. > > <when> is completly ignored (no matter !=,>==), alle messages are routed to > activemq:queue:MAIL_NOTIFICATIONS. > Where is problem ? >
There must be spaces around the operator. Also the ${body} is preferred to be on the left hand side, so swap them, and make sure there is spaces around the operator. > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/activemq-router-pattern-problem-with-when-tp4685750p4685750.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/