Hello ,
I am newbie to spring integration and looking at best practice to do parallel processing using SI.
I am trying to use splitter /aggegtor to achieve following :
1) Read a file containing thousands of records
2) Split records to a chunk
3) Give it to processor for parallel processing
4) Read the processed records
5) Aggregate the records
6) Return the response .
Here is my context file till splitter:
Problem is I am not seeing parallel processing behavior in MolProcessor class. Can sombody give me example/link to spring integration threading with task executor example ?Code:<int:channel id="fileInputChannel"></int:channel> <int:splitter id="splitter" input-channel="fileInputChannel" ref="customSplitter" output-channel="splitPayLoad"> </int:splitter> <int:channel id="splitPayLoad"> <int:dispatcher task-executor="exec" /> </int:channel> <task:executor id="exec" /> <bean id="customSplitter" class="com.abc.assignment2.CustomSplitter" /> <int:service-activator input-channel="splitPayLoad" output-channel="serviceOutput" ref="molProcessor" method="processMol" /> <int:channel id="serviceOutput"></int:channel> <bean id="molProcessor" class="com.abc.assignment2.MolProcessor" />
Thanks


Reply With Quote
