Hello,
I tried putting implementation inside custom AggregationStrategy and it
seems to be working.I dont know why i was getting empty string when i did
debug this newexchange object in intellij.
Thanks for your help
public class MyAggregationStrategy implements AggregationStrategy {
@Override
public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
List<Exchange> list;
Exchange answer = oldExchange;
if (oldExchange == null) {
answer = new DefaultExchange(newExchange);
list = new ArrayList<Exchange>();
answer.setProperty(Exchange.GROUPED_EXCHANGE, list);
} else {
list = oldExchange.getProperty(Exchange.GROUPED_EXCHANGE,
List.class);
}
Message message = newExchange.getIn();
message.setBody(newExchange.getIn().getBody(String.class));
if (newExchange != null) {
list.add(newExchange);
}
return answer;
}
}
--
View this message in context:
http://camel.465427.n5.nabble.com/Converting-message-body-after-GroupedExchangeAggregationStrategy-tp5158191p5160884.html
Sent from the Camel - Users mailing list archive at Nabble.com.