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>