Hi Olek, > I'm not sure if the example I've added in the original message is visible > by you? I've added example route to the message above and it is visible via > web page.Please advice as this is my first post here :)
Yeah, I can see the code via Nabble web interface, but the code formatting makes the examples invisible for GMail. It is safer to send examples as plain text. :) > More detailed description of my reqs are as be: > And yes before I'll continue processing I need > to aggregate results from (2) and (3). Ok, let's start with some EIP magic here. :) Your problem can be solved with the following EIP flow: a) Split the message coming to the aggregation HTTP endpoint. b) Start concurrent processing for each part of the split message. c) For each part of the message send it to the content based router. d) The router decides to which Enricher endpoint message should be sent. e) Aggregate the results using the GroupedExchangeAggregationStrategy. f) Send response. And this is sample routes demonstrating possible implementation of the flow above: from("direct:emulateLegacyHttp"). setBody().simple("emulateLegacyHttp-${body}"); from("direct:emulateNonLegacyHttp"). setBody().simple("emulateNonLegacyHttp-${body}"); from("direct:serviceAggregator"). split(body().tokenize(":")). aggregationStrategy(new GroupedExchangeAggregationStrategy()). parallelProcessing(). choice(). when(body().isEqualTo("foo")). enrich("direct:emulateLegacyHttp"). otherwise(). enrich("direct:emulateNonLegacyHttp"). end(). end(). to("direct:aggregatedResults"); These are the core routing rules for your issue. You can enhance it with timeout, filtering and other features you need. The results of aggregation will be stored in the exchange property under the following key - Exchange.GROUPED_EXCHANGE . Remember that Camel is pretty flexible so my solution is not the only one possible. That's how I would do it. :) Here is also some lecture [1] from my blog regarding service aggregation. :) [1] http://henryk-konsek.blogspot.com/2012/05/aggregating-multiple-web-services.html -- Henryk Konsek http://henryk-konsek.blogspot.com