2 Replies Latest reply on Mar 31, 2010 5:58 PM by lufe

    Dynamic Routing

    lufe

      We're in a project in Switzerland trying to make a Dynamic Route in Camel. Using the latest Fuse version and Camel 2.

       

      Now we tried to use the DynamicRouter pattern but it's not exactly what we want.

       

      The DynamicRouter pattern can dynamically add a recipient to a recipient list. That means, if originally the router sends the message from and endpoint to destinations A and B, you can add a destination C dynamically. Now the message will be sent (without having to write any code) to A, B and C.

       

      What we wanted to achieve is something different. We want a route that says:

       

      "Send message from A1 to B1" originally, and then, dynamically change it so that the router now sends message from A1 to A2 to B1 (including A2 on the route).

       

      The difference is that we don't want to send the same messsage to A1, A2 and B1. We want the message to be processed by A1, then after it's changed by A1, go to A2 (that was added dynamically to the route) and then finally to B1.

       

      Originally the message would have gone only from A1 to B1, before the dynamic reconfiguration of the route.

       

      Is there a way to do this? Can someone point me to an example? I couldn't find any.

       

      Thanks

      T