We are reading messages from Websphere MQ using JMS and Spring Integration.
<task:executor id="demoMessageReceiverChannelTE" pool-size="1-3" queue-capacity="5" keep-alive="1" rejection-policy="CALLER_RUNS"/>
<int:channel id="demoMessageReceiverChannel">
<int:dispatcher task-executor="demoMessageReceiverChannelTE"/>
<int:interceptors>
<int:ref bean="messageReceiverInterceptor" />
</int:interceptors>
</int:channel>
<jms:message-driven-channel-adapter
id="demoMesssageReceiverAdapter" channel="demoMessageReceiverChannel"
connection-factory="srcJmsConnectionFactory" destination="srcReceiverQueue"
error-channel="errorChannel" message-converter="demoIncomingMessageConverter"
transaction-manager="srcJmsTransactionManager" send-timeout="65000"
header-mapper="demoJmsHeaders" />
There is another system, which put message on this Queue. (Out of scope for us)
We can have 2000 messages at a time on queue to be read.
Sometimes, Message Listener stops reading messages from Queue, when I tried to troubleshoot this issue, it gives reason that there are some un-commited message on queue, which listener trying to read and won't be able to process further and hangs there itself.
As when delete that message manually from queue, it processes other message perfectly.
So how to skip such uncommitted messages, so that system can continue with next message ?