Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Aggregator not being called?

  1. #11
    Join Date
    Mar 2012
    Posts
    4

    Default

    I have solved it ,like config below:

    <bean id="query_partitionHandler" class="org.springframework.batch.integration.parti tion.MessageChannelPartitionHandler">
    <property name="stepName" value="step_query"/>
    <property name="gridSize" value="5"/>
    <property name="replyChannel" ref="replies"/>
    <property name="messagingOperations">
    <bean class="org.springframework.integration.core.Messag ingTemplate">
    <property name="defaultChannel" ref="requests"/>
    <property name="receiveTimeout" value="30000"/>
    </bean>
    </property>
    </bean>
    <int:channel id="requests">
    <int:queue />
    </int:channel>
    <int:channel id="staging" />
    <int:service-activator ref="stepExecutionRequestHandler" input-channel="worker" />
    <bean id="stepExecutionRequestHandler"
    class="org.springframework.batch.integration.parti tion.StepExecutionRequestHandler">
    <property name="jobExplorer" ref="jobExplorer"/>
    <property name="stepLocator" ref="stepLocator"/>
    </bean>
    <int:aggregator ref="query_partitionHandler" input-channel="staging" output-channel="replies"/>
    <int-jms:outbound-gateway request-channel="requests"
    request-destination-name="requestsQueue" reply-channel="staging"
    receive-timeout="60000">
    <intoller fixed-rate="200" task-executor="stepTaskExecutor" />
    </int-jms:outbound-gateway>
    <int-jms:inbound-gateway request-channel="worker"
    request-destination-name="requestsQueue" concurrent-consumers="2"/>
    <int:channel id="replies">
    <int:queue/>
    </int:channel>



    Thanks to everyone that helped on this!

  2. #12
    Join Date
    Mar 2012
    Posts
    10

    Default

    If you get the solution please help me too as i am experiencing the same problem.

  3. #13
    Join Date
    Jun 2012
    Posts
    14

    Default

    I have modify the code a bit according to other post in forum .. here is breif description
    JVM1 MY controller ( calling 2 slaves)
    JVM2 AcitveMq runing jvm localhost
    JVM3 slave 1
    JVM4 slave 2

    When i run the code its only invoking the JVM3 twice and wont invoke my second slave ?
    Code:
     
    <beans:bean id="partitionHandler" class="org.springframework.batch.integration.partition.MessageChannelPartitionHandler">
    		<beans:property name="stepName" value="step1"/>
    		<beans:property name="gridSize" value="2"/>
    		<beans:property name="messagingOperations">
    			<beans:bean class="org.springframework.integration.core.MessagingTemplate">
    				<beans:property name="defaultChannel" ref="requests"/>
    				<beans:property name="receiveTimeout" value="999999"/>
    			</beans:bean>
    		</beans:property>
    	</beans:bean>
    	
    
    
    	<task:executor id="taskExecutor"  />
    
    	<int:channel id="requests">
    		<int:queue  />
    	</int:channel>
    
    <int:channel id="staging" />
    
    
    	<int:service-activator ref="stepExecutionRequestHandler" input-channel="worker" />
    
        <int:aggregator ref="partitionHandler" input-channel="staging" />
    
    
    <int-jms:outbound-gateway request-channel="requests" request-destination-name="bos.job.slave.requests" reply-channel="staging" receive-timeout="30000">
    		<int:poller fixed-rate="200" task-executor="taskExecutor" />
    	</int-jms:outbound-gateway>
    
    <int-jms:inbound-gateway request-channel="worker" request-destination-name="bos.job.slave.requests"  concurrent-consumers="3" />
    
    
    <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory" >
    		<property name="brokerURL" value="tcp://localhost:61616"/>
    	</bean>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •