2 Replies Latest reply on Oct 26, 2010 7:03 AM by Madhu CM

    Content-Based Routing Exception

    Madhu CM Newbie


      I am using CBR in my service using JBR .

      Here i want to handle exception which will throw inside ContentBasedRouter Action.

      when property <route-to expression="XXXX" does not meet criteria , it will throw "org.jboss.soa.esb.services.routing.MessageRouterException: Failed to deliver message to Dead Letter Channel."

      So how to handle this exception so that i can put my own exception message.


      i have one solution but i dont know if this works,

      Create your custom action class which will extend ContentBasedRouter , there on you can throw an exeption.


      Is this can be done ? or please give some solution.



      Madhu CM

        • 1. Re: Content-Based Routing Exception
          Tom Fennelly Master



          I'm fairly sure failure to match a rule should not result in a MessageRouterException.  However, failure to compile the expression would result in an exception.  Are you sure you have the expression right?


          I think you need to work out why it is trying to route to the DLQ (bad expression perhaps?) and then why routing to the DLQ is failing.  So it seems like you have 2 issues there.

          • 2. Re: Content-Based Routing Exception
            Madhu CM Newbie


            Thanks for reply.

            I am using <route-to expression="xxxx" multiple times in my service for comparing the content of different element.

            If criteria is matching then i get no exception , but if content in the expression is not matching then i am getting an MessageRouterException.

            The xpath which i am specifying in expression will always compares with the content of incoming message.

            I have right expression defined.