8 Replies Latest reply on Jul 26, 2010 2:37 PM by Martin Vecera

    Content based routing - using message property

    ShravanKumar Raju Newbie

      Dear Experts,

       

      is it possible to route the message by interpreting the message properties?

       

      have tried with the below code extract howerver it did not work. requirement is to make decision on the subscriptionAction property. which is set in the first action of the Action pipeline?

      examples for CBR rules are highly appreciated. have tried using JBOSS content based routing as it didn't work went ahead and implemented my own content based router(pure java logic) which makes use of service invoker for routing. however it lacks the synchrnous behaviour though i can use deliverSynch method of service invoker somehow not feeling comfortable with it. want to make use of standard content based router of JBOSS.

       

      rule "Add Routing Rule using XPATH"
      action = Message.getProperties().getProperty("subscriptionAction");
      Log : "subscription is" + action;
      System.out.println("ADD ROUTING rule is being evaluated");

       

          when
          Log : "ADD ROUTING rule is being evaluated";
          sa : SubscriptionAction( subscriptionAction == "ADD")
          Log : "ADD ROUTING rule is being evaluated" + sa ;
                
          then
              System.out.println("ADD ROUTING rule is selected");      
              destinations.add("add");           
      end

       


      Regards,

      -Shravan