Hello Willem,

Maybe what we need here is multicaster/aggregator scenario similar to
what I did lately with splitter/aggregator at
https://issues.apache.org/activemq/browse/CAMEL-260

In my scenario the same splitter (works in 'InOut mode') splits
messages and then aggregates results. Basically MulticastProcessor
could do the same thing with responses it receives, and we could
create some base class that does it.

Maybe lets create an issue for this problem?

I'm afraid that at the moment Camel cannot handle the solution you
propose (correct me if I'm wrong guys ;) ).

Roman

2007/12/20, Willem Jiang <[EMAIL PROTECTED]>:
> 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