I'm picking up an object to work from a directory and instead of using
content based routing (because the predicates are complex), I'm thinking of
doing something like this:

from("direct:workEventQueue")
.process(blueWorker).choice().when(header("done").isNotNull()).to("direct:done")
.process(redWorker).choice().when(header("done").isNotNull()).to("direct:done")
.process(greenWorker).choice().when(header("done").isNotNull()).to("direct:done");


where the processor sets the header if work has been completed and the
exchange does not need to be routed through the other processors.

My question are: Is this a reasonable way to perform the work?   Does this
technique have an EIP pattern name please?

Thanks! --Matt Payne

Reply via email to