Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Difference between browsing messages or just get them one by one

For IBM MQ it is possible to use MQGET to browse messages on a queue (https://www.ibm.com/docs/en/ibm-mq/9.2?topic=queue-browsing-messages) or just do a ‘normal’ MQGET (https://www.ibm.com/docs/en/ibm-mq/9.2?topic=queue-getting-messages-from-using-mqget-call)

I cannot find any differences in what a browse does (except using a cursor) and a normal get does, in terms of what content is being retrieved.

Am I missing something here?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

In general a normal get is destructive and the message is permanently removed from the queue, a browse is not deductive and does not remove the message from the queue. The message content returned is the same in either case.

There are three basic situations:

  1. A get with the browse option does not remove the message from the queue, it is still available for other consumers to get or browse from the queue.

  2. A normal get outside of a unit of work will remove the message from the queue, it will not be available for other consumers to get or browse from the queue.

  3. A normal get inside of a unit of work will make the message unavailable for other consumers to get or browse from the queue.

    • If the unit of work is committed the message will be removed from the queue, it will not be available for other consumers to get or browse from the queue.
    • If the unit of work is backed out the message will be available again for other consumers to get or browse from the queue.
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading