Use the options of the MQOPEN call
In the Options parameter of the MQOPEN call, we must choose one or more options to control the access that we are given to the object that we are opening. With these options we can:
- Open a queue and specify that all messages put to that queue must be directed to the same instance of it
- Open a queue to allow you to put messages on it
- Open a queue to allow you to browse messages on it
- Open a queue to allow you to remove messages from it
- Open an object to allow you to inquire about and set its attributes (but we can set the attributes of queues only)
- Open a topic or topic string to publish messages to it
- Associate context information with a message
- Nominate an alternative user identifier to be used for security checks
- Control the call if the queue manager is in a quiescing state
- MQOPEN option for cluster queue
The binding used for the queue handle is taken from the DefBind queue attribute, which can take the value MQBND_BIND_ON_OPEN, MQBND_BIND_NOT_FIXED, or MQBND_BIND_ON_GROUP. - MQOPEN option for putting messages
To open a queue or topic to put messages on it, use the MQOO_OUTPUT option. - MQOPEN option for browsing messages
To open a queue so that we can browse the messages on it, use the MQOPEN call with the MQOO_BROWSE option. - MQOPEN options for removing messages
Three options control the opening of a queue to remove messages from it. - MQOPEN options for setting and inquiring about attributes
To open a queue so that we can set its attributes, use the MQOO_SET option. - MQOPEN options relating to message context
To be able to associate context information with a message when you put it on a queue, we must use one of the message context options when you open the queue. - MQOPEN option for alternative user authority
When you attempt to open an object using the MQOPEN call, the queue manager checks that we have the authority to open that object. If we are not authorized, the call fails. - MQOPEN option for queue manager quiescing
If we use the MQOPEN call when the queue manager is in a quiescing state, the call might fail, depending on which environment we are using. - MQOPEN option for resolving local queue names
When you open a local, alias or model queue, the local queue is returned.
Parent topic: Opening objects using the MQOPEN call