Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I receive FIFO messages in Client side? 1

Status
Not open for further replies.

bluecity

Programmer
Feb 16, 2001
3
US
I have implemented C++ in client side to receive messages from MQSeries Server. The problem is if I have two messages, the second one is received earlier than the first one. For some reason in server side, the second one is set higher priority than the first one. How can I receive message in FIFO order, not in priority order, no matter what order has been setup in server side?
 
You cannot generally do this efficiently. The easiest and recommended way is to set the queue to FIFo delivery sequence. You may be able to do this from your client if you have MQSET access for the queue. Failing that if you know the MsgId or correlId search on those instead. Finally, if you have no choice, you will need to browse each message and sort them into date order using PUTDATE/TIME in the message descriptor. This assumes that:

- noone else is getting messages from the queue
- all systems that put messages onto this queue have synchronised clocks

and probably other things I don't want to think about! Don't do it.

Cheers,
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top