ActiveMQ & Camel - How to create dependency in routing routes

I have a message routing for an implementation that has routes that differ depending on the content of the message. Some strands of the route depend on others.

If, for example, I have Data_A on which Task_A and Task_B will run. Whereas Data_B only does Task_B.

Here, each task has a queue served by consumers.

If Task_A needs to be executed only after Task_B, if Task_B is requested in the data, how do I set up such dependencies?

+2


a source to share


1 answer


You can use multiple routes to fork your workflow like



from("queue:start").
  choice().xpath("//foo")).to("queue:taskB").
  otherwise().to("queue:taskA");

from("queue:taskB").process(new DoTaskB()).to("queue:taskA");

from("queue:taskA").process(new DoTaskA()).to("queue:done");

      

+4


a source







All Articles