Hi, I want to combine messages from 2 different exchanges into a single exchange, from the EIP patterns aggregation strategy seems to be right pattern to use.
However, after reading the doc (http://camel.apache.org/aggregator.html), I followed the instructns but my aggregation strategy only returns the last exchange, even though I specifically configured it to send messages only when the outbatchsize is 2. I implemented a custom aggregationstrategy with shoulld combine my exchanges into one. I log the event in the class and it works fine, what is beyond me is why it returns only the last exchange. See my config here: <bean id="myAggregatorStrategy" class="org.tempuri.MyAggregationStrategy"/> <osgi:camelContext xmlns="http://camel.apache.org/schema/spring" trace="true"> <route> <from uri="direct:RequestProcessor" /> <to uri="xslt:requestToSOAP.xsl"/> <wireTap uri="direct:AggregatorServices"/> <to uri="xslt:requestToManager.xsl"/> <convertBodyTo type="javax.xml.transform.dom.DOMSource" /> <to uri="nmr:{http://services.locator/}Service:ServicesPort"/> <to uri="direct:AggregatorServices"/> </route> <route> <from uri="direct:AggregatorServices" /> <aggregate strategyRef="myAggregatorStrategy" outBatchSize="2"> <correlationExpression> <constant>true</constant> </correlationExpression> <to uri="direct:ProcessorServices"/> </aggregate> </route> <route> <from uri="direct:ProcessorServices" /> <to uri="log:Response"/> </route> </osgi:camelContext> log:Response only print out response from <to uri="nmr:{http://services.locator/}Service:ServicesPort"/>. Meanwhile, the log inside myStratRef (myAggregatorStrategy), which I ask to concatenate the old & new exchanges shows both exchanges were concatenated. How do I get this concatenated exchange to be sent (to log:Resposne)? Regards. -- View this message in context: http://old.nabble.com/Aggregator%27s-not-returning-combined-exchanges%2C-only-returns-last-exchange-tp27270355p27270355.html Sent from the Camel - Users mailing list archive at Nabble.com.
