문제

I have a message routing to implement, which has routes that vary according to the message content. Some strands of the route are dependent on other.

If for example I have Data_A which has Task_A and Task_B to be performed on it. Whereas Data_B has only Task_B to be performed on it.

Here each Task has a queue served by consumers.

If Task_A should be performed only after Task_B if Task_B is requested on the data, how do I set-up such dependencies?

도움이 되었습니까?

해결책

You can use several routes to branch out the workflow, like this

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");
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top