5.6. Advance topics

Here we present some of the advance functionality of the C++ API, specifically the browsing messages functionality, and the inquiring and setting object attributes functionality.

5.6.1. Browsing messages on a queue

Messages on a queue can be browsed using an ImqQueue get method. The ImqQueue object must be open using the MQOO_BROWSE open option. That can be done using the setOpenOptions or the openFor method as described in “Opening queues” on page 139.

pqueue.setOpenOptions(MQOO_BROWSE);

or

pqueue.openFor(MQOO_BROWSE);

After the queue object has been opened for browse, the ImqQueue get method has to be called with an ImqGetMessageOptions object with the following options:

  • MQGMO_BROWSE_FIRST message option, if you want ...

Get MQSeries Programming Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.