Announcement Announcement Module
Collapse
No announcement yet.
Spring Integration parallel processing Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Integration parallel processing

    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:

    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" />
    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 ?

    Thanks

  • #2
    Hello

    What I can recomend you it is just reading Spring Manual: http://static.springsource.org/sprin...task-namespace
    I think it will be enough to understand how it works.
    However right now try to set 'pool-size' attribute on the <task:executor>, e.g. 10. By default it is '1'. So, you end up only with one Thread for parallelism

    Take care,
    Artem

    Comment


    • #3
      Thanks Cleric

      Comment

      Working...
      X