Hi ,

I have a use case , the router configuration could like this

from("direct:a").multicast().to("direct:x", "direct:y", "direct:z"); from("direct:x").process(new AppendingProcessor("x")).to("direct:aggregater"); from("direct:y").process(new AppendingProcessor("y")).to("direct:aggregater"); from("direct:z").process(new AppendingProcessor("z")).to("direct:aggregater"); from("direct:aggregater").aggregator(header("cheese"), new BodyAggregatingStrategy()). completedPredicate(header("aggregated").isEqualTo(3)).to("mock:result");

Now I send the message to endpoint "direct:a" and I want to get the final result of the processors. Since I use multicast() in the pipeline and I can't get the right result after the hole processes finished like the blew code.

   Exchange exchange = template.send("direct:a", new Processor() {
           public void process(Exchange exchange) {
               Message in = exchange.getIn();
               in.setBody("input");
               in.setHeader("foo", "bar");
           }
       });

Is there a way to get the result from the sending point or some other place?

Thanks,

Willem.


Reply via email to