2 Replies Latest reply on Jan 29, 2009 4:35 AM by airber

    Dynamic Routing decision in dependence of message-body content (Camel)

    airber

      Hello at all,

       

      Following Problem:

      I have different messages coming in my queue. In dependence on the body-content in these messages I want to route the message to different endpoints.

      For example if a string like "PFS" stands in the first row of the body, the endpoint should be "activemq:pfs" or if there stands "PRL" the endpoint should be "activemq:prl". This should be parsed by a regex in a bean.

       

      The documentation only show examples for true-false-decisions (http://camel.apache.org/bean-language.html) and not how to handle with custom return values.

      But what I want is to dynamical route the message directly in the bean method...

       

      In next step the endpoint self should be dynamicaly created in dependence of the incoming body.

       

      Thanks a lot

      airber