> I want to merge the message bodies into a container object.
I would use GroupedExchangeAggregationStrategy and then forward the
results of the aggregation to the processor.
from("direct:aggregateMe").
aggregate(constant(true),new GroupedExchangeAggregationStrategy()).
completionSize(2).
.setBody(property(Exchange.GROUPED_EXCHANGE)).
process(new MyMergeProcessor()).
to("mock:merged");
Keep in mind that this approach separates aggregation logic from
message normalization.
Have a nice day :) .
--
Henryk Konsek
http://henryk-konsek.blogspot.com