camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Filtering with the simple expression does not work ?
Date Thu, 08 Oct 2009 18:18:04 GMT
Hi

The simple language does NOT support operators in Camel 1.x.
This feature requires to use Camel 2.0.

You have to use something else such as mvel, ognl, groovy or a regular
bean for the testing.

Or upgrade to Camel 2.0 and use Simple.


On Thu, Oct 8, 2009 at 6:41 PM, titexe <AbdellatifBOUCHAMA@eurofins.com> wrote:
>
> Hello,
>
> My route is simple, I have a incoming queue (IN), All messages received in
> this queue is routed to XML Queue or CSV Queue according to the following
> condition:
>
> If the Action field located in the header of the message as field properties
> (Message Properties) is equal to XML or CSV
>
> This route does not work using the simple expression?
>
> Below my configuration:
>
> <camelContext id="camel" trace="true"
> xmlns="http://activemq.apache.org/camel/schema/spring">
> <route>
>        <from uri="activemq:queue:IN"/>
>                <choice>
>                <when>
>                                <simple>${in.header.Action} == 'XML'</simple>
>                                <to uri="activemq:queue:XML"/>
>                </when>
>                <when>
>                                <simple>${in.header.Action} == 'CSV'</simple>
>                                <to uri="activemq:queue:CSV"/>
>                </when>
>                <otherwise>
>                    <to uri="activemq:queue:ERROR"/>
>                </otherwise>
>            </choice>
> </route>
> </camelContext>
>
> Version Camel : 1.6.1
> Version Java    : 1.6
> Version Activemq : fuse message broker 5.3.0.3
>
> Thank you in advance
>
> Best regards,
>
> titexe
>
> --
> View this message in context: http://www.nabble.com/Filtering-with-the-simple-expression-does-not-work---tp25803293p25803293.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message