I really don't want grouped exchanges, that is if I understand them
correctly.  I want to merge the message bodies into a container object.
In a nutshell, I am loading a third-party XML file, splitting it into
individual items, normalizing those items into my objects, and then I want
to aggregate them back together to output a single XML file again.  So, I
am trying to take the JAXB objects that in the message body and add them
to a JAXB container Root object that.  For example,


<items>  <!--This is the container Root object-->
   <item> 
   </item>
   Š.
</items>

Each exchange has an item object in the message body.  I want add them to
the items object and set the new body that is returned from the aggregator
to be the items object which is continuously adding each individual item
object.



On 11/29/12 1:57 PM, "Henryk Konsek" <[email protected]> wrote:

>Hi Jason,
>
>> Here is my AggregationStrategy:
>
>Your custom aggregation strategy acts like
>GroupedExchangeAggregationStrategy. Why don't use the latter then?
>
>from("direct:aggregateMe").
>  aggregate(constant(true),new GroupedExchangeAggregationStrategy()).
>  completionSize(2).
>  .setBody(property(Exchange.GROUPED_EXCHANGE)).
>  to("mock:aggregated");
>
>Kind regards.
>
>--
>Henryk Konsek
>http://henryk-konsek.blogspot.com
>

Reply via email to