IBM MQ XMS Message Listener fetching only the Messages which is already available in Queue and not a new one

1.2k views Asked by At

I have Sender and receiver console applications for IBM MQ XMS. The sender populates the Queue and the receiver dequeue the queue manger using receive method. I am using the while loop with bool value to keep running the receiver so that whenever a new message is available in the queue receiver can get that data. Now i want to change the receiver code to Asynchronous Message Listener instead of consumer.Receive(). The code snippet is,

consumerAsync = sessionWMQ.CreateConsumer(destination);                
messageListener = new MessageListener(OnMessageCallBack);
consumerAsync.MessageListener = messageListener;

connectionWMQ.Start();
While(true)
{
    console.writeline("Wait for message");
}

The above code fetches only the already available data and not the new one. For example if i have 2 data in my queue while starting the receiver application those messages getting downloaded. but when i keep the receiver application running and send a new data from sender app its not getting downloaded and i have to restart the receiver application to get that data. The similar scenario was working fine with synchronous mode consumer.ReceiveNoWait().

What am I missing?

2

There are 2 answers

11
kaseidu On

Version of XMS? Version 9.2 has a bug that was confirmed by IBM 10.28.2020. They're working on a fix. No APAR yet. Temporary solution would be to downgrade to client version 9.1.

Update: Received a fix built on version 9.2.0.1 IT34722. Tested ok. Should be released with fixpack 9.2.0.4.

3
Daniel On

I have posted a support-case to ibm on this issue a long time ago(81 days...) Long time for such a bug. The apar is IT34722 but at the date is still in open status.

9.1.3 might work but have other problems/bugs and will not be found as nuget-package