Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
2.14.3
-
None
-
None
-
Unknown
Description
As it can be concluded from AggregationStrategy javadoc, and also from available implementations such as GroupedExchangeAggregationStrategy, it should be used in the following manner:
AggregationStrategy strategy = new GroupedExchangeAggregationStrategy(); Exchange result = null; result = strategy.aggregate(result, exchange1); result = strategy.aggregate(result, exchange2); // ... and so on return result;
But PollEnricher do it in following manner:
AggregationStrategy strategy = new GroupedExchangeAggregationStrategy(); Exchange result = strategy.aggregate(exchange1, exchange2); return result;
This leads to incorrect result returned after aggregation and lost exchanges.
Also PollEnricher doesn't handle CompletionAwareAggregationStrategy and does not call onCompletion(). Consequently GroupedExchangeAggregationStrategy does not return aggregated result in the Exchange body.