2 Replies Latest reply on May 8, 2009 3:55 PM by Gary Motts

    Boolean Filter condiitons in Camel?

    Gary Motts Novice

      Hello,

       

      I'm interested in building filter conditions in Camel that contain booleans and am looking for suggestions.   For instance, I know the following basic filter will work:

       

      from("activemq:topic:topic2").filter(header("OrginatingApplication").isEqualTo("01")).to("activemq:queue:example2");

       

      How do I filter on another header value using an AND operator?  I need something like this which is not supported:

       

      from("activemq:topic:topic2").filter(header("OrginatingApplication").isEqualTo("01") AND header("Key").isEqualTo("ABC)).to("activemq:queue:example2");

       

      My alternative design is to implement a JMS Selector and use SQL92....But for some reason this filter does not seem to work:

       

      from("activemq:topic:topic2").to("activemq:queue:example3?selector=OriginatingApplication='01'&key='ABC'");

       

       

      -Gary

       

      Edited by: gmotts on May 8, 2009 10:34 AM

       

      Edited by: gmotts on May 8, 2009 10:38 AM

       

      Edited by: gmotts on May 8, 2009 10:41 AM