我正在开发一个基于spring batch admin的项目 . 我使用spring-integration的 <int-jms:message-driven-channel-adapter/>
,它从队列中选取消息并将它们推送到调用服务激活器的通道 . 然后,服务激活器调用批处理作业 .
spring-batch-admin在内部使用一个taskMecutor,其池大小为6(在spring-batch-admin-manager-1.2.2-release.jar中可用) . 此任务执行程序将 rejectionPolicy
配置为 ABORT
,即如果作业请求超过6,则中止其他作业请求 . 但是当我运行超过100个请求的项目时,我在Spring批处理管理控制台中看到它们的状态为STARTING,尽管一次只能处理6个作业请求 .
我不知道剩余的工作请求在哪里排队 . 如果有人可以解释我或给出一些指示,将不胜感激 .
配置:
<int-jms:message-driven-channel-adapter id="jmsIn"
connection-factory="connectionFactory"
destination-name="${JMS.SERVER.QUEUE}" channel="jmsInChannel"
extract-payload="false" send-timeout="20000"/>
<integration:service-activator id="serviceAct" input-channel="jmsInChannel" output-channel="fileNamesChannel"
ref="handler" method="process" />
<bean id="handler" class="com.mycompany.integration.AnalysisMessageProcessor">
<property name="jobHashTable" ref="jobsMapping" />
</bean>
<batch:job id="fullRebalanceJob" incrementer="jobIdIncrementer">
<batch:step id="stepGeneral">
<batch:tasklet>
<bean class="com.mycompany.batch.tasklet.DoGeneralTasklet" scope="step">
<property name="resultId" value="#{jobParameters[resultId]}" />
</bean>
</batch:tasklet>
<batch:next on="REC-SELLS" to="stepRecordSells"/>
<batch:fail on="FAILED" />
<batch:listeners>
<batch:listener ref="stepListener" />
</batch:listeners>
</batch:step>
<batch:step id="stepDoNext">
<batch:tasklet ref="dcnNext" />
</batch:step>
</batch:job>
提前致谢 . 如果需要更多详细信息,请与我们联系 .