Can you try using adding all your response in a list in your aggregation
strategy. It works for me like below:

AggregationStrategy surnameAggregator = new AggregationStrategy() {
            @SuppressWarnings("unchecked")
            public Exchange aggregate(Exchange oldExchange, Exchange
newExchange) {
                debugIn("Surname Aggregator", oldExchange, newExchange);
 
                Exchange answer = newExchange;
 
                if (oldExchange != null) {
                    List<String> brothers =
oldExchange.getIn().getBody(List.class);
                    brothers.add(newExchange.getIn().getBody(String.class));
                    answer = oldExchange;
                } else {
                    List<String>brothers = new ArrayList<String>();
                    brothers.add(newExchange.getIn().getBody(String.class));
                    newExchange.getIn().setBody(brothers);
                }
 
                debugOut("Surname Aggregator", answer);
 
                return answer;
            }
        };
 

You can refer to below link for more agrregation examples:
http://massapi.com/class/ag/AggregationStrategy.html




--
View this message in context: 
http://camel.465427.n5.nabble.com/not-getting-combined-response-from-aggregator-tp5731362p5731865.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to