Camel Split aggregator to merge exchanges as List -


i trying split list of map instances , process them in bean , merge them in list object. 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 end, splits list<map> object, process them after end of split, when want whole items list, gives me 1 of them.

is because of org.apache.camel.processor.aggregate.groupedexchangeaggregationstrategy? how can make this?

my camel version is: 2.11.2

thx

apologies delay in answering. according apache camel documentation:

camel 2.2 or older:

the splitter default return last splitted message.

camel 2.3 , newer

the splitter default return original input message.

this default behaviors splitter without aggregation strategy. in case after split completed receive original message in case map sent originally. providing aggregation strategy overriding default strategy.

if running 2.2 , older need implement aggregation strategy. try route:

<camel:route>         <camel:from uri="ref:contacthistorydbread"/>         <camel:split parallelprocessing="true" streaming="true">             <camel:simple>${in.body}</camel:simple>             <camel:bean ref="dosomeprocessingonthemapbean" method="transform"/>         </camel:split>         <camel:bean ref="convertmaptolistbean" method="transformmaptolist"/>         <camel:to uri="ref:abeanthatconsumesthelist"/> </camel:route> 

shout if need more information.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -