In an aggregation strategy where we are trying to combine multiple response bodies, we are getting "encoded?" values back when reading the body with exchange.getIn().getBody(). Here I am setting up multiple URLs that will be hit to retrieve data from using a recipientList:
.recipientList(header("DynamicCommaSeparatedURLs"))
.aggregationStrategy(new EmployeeResponseAggregationStrategy()).parallelProcessing(true);
In the aggregation code, I need to combine all the response and return merged response bodies:
public class EmployeeResponseAggregationStrategy implements AggregationStrategy {
public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
String uri = newExchange.getProperty(Exchange.RECIPIENT_LIST_ENDPOINT, String.class);
System.out.println(uri);
if (oldExchange == null) {
return newExchange;
} else {
String jsonString = oldExchange.getIn().getBody(String.class);
//expecting json here
System.out.println(jsonString);
return oldExchange;
}
}
}
My issue
The print line (System.out.println(jsonString);) returns this: c8Ot��C�|�X<D�L�䠍�g.����=� �rc4�
Where I am expecting this as in Postman response to the same URL: 
Do not know what I am doing wrong as I am using similar functionality to aggregate other multicast responses.