mercredi 1 avril 2015

Camel Split aggregator to merge exchanges as List

I am simply trying to split a list of Map instances , process them in a bean and merge them in a list object. So I have made this:



<camel:route>
<camel:from uri="ref:contactHistoryDbRead"/>
<camel:split parallelProcessing="true" streaming="true" strategyRef="groupedExchangeAggregationStrategy">
<camel:simple>${in.body}</camel:simple>
<camel:bean ref="contactHistoryRequestTransformer" method="transform"/>
</camel:split>
<camel:bean ref="contactHistoryService" method="createContactHistory"/>
<camel:to uri="ref:contactHistoryDbUpdate"/>
</camel:route>


In the end, it splits the List<Map> object, process them but just after the end of split, when I want to get the whole items as a List, it gives me only one of them.


Is it because of the org.apache.camel.processor.aggregate.GroupedExchangeAggregationStrategy? how can I make this?


Thx


Aucun commentaire:

Enregistrer un commentaire