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?
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.