Random "dispatcher has no subscribers" exception with Spring Batch
We currently have a spring batch application in production that is experiencing MessageDeliveryException randomly. The exception is occurring in an item processor that uses a JMS outbound gateway.
Here's the relevant config:
Code:
<si:channel id="requestChannel"/>
<jms:outbound-gateway id="outboundGateway" request-channel="requestChannel"
connection-factory="connectionFactory"
request-destination="requestQueue"
reply-channel="responseChannel"
receive-timeout="1200000" />
<si:channel id="responseChannel"/>
<bean id="changesvcRequestQueue" class="com.ibm.mq.jms.MQQueue">
<constructor-arg index="0" value="QUEUE.NAME.HERE"/>
</bean>
<si:gateway id="requestGateway" default-request-channel="requestChannel"
default-reply-channel="responseChannel"
service-interface="o.o.t.s.MessagingServiceGateway" />
I have to add that the item processor that uses the gateway is set up to have a scope of "step" and it is a delegate in a composite item processor.
Code:
<bean id="processor4" class="o.o.t.p.ProcessorFour" scope="step">
<property name="gateway" ref="requestGateway"/>
</bean>
<bean id="compositeProcessor" class="org.springframework.batch.item.support.CompositeItemProcessor" scope="step">
<property name="delegates">
<list>
<ref bean="processorOne"/>
<ref bean="processorTwo"/>
<ref bean="processorThree"/>
<ref bean="processorFour"/>
</list>
</property>
</bean>
Another developer suggested that the speed of processing may be causing the item processor to do its work before the gateway has finished all the setup/initialization it needs to do. Is this possible? Anyone else experienced this? Ideas? Help!