An option on the MQOPEN call, the MQOO_BIND_ON_OPEN option, allows you to specify that, when there are multiple instances of the same queue within a cluster, the target queue manager needs to be fixed. That is, all messages put to the queue specifying the object handle returned from the MQOPEN call must be directed to the same queue manager using the same route.
Use this option when you have messages with affinities. For example, if you need a batch of messages all to be processed by the same queue manager, specify MQOO_BIND_ON_OPEN when you open the queue. WebSphere MQ fixes the queue manager and the route to be taken by all messages put to that queue.
If you do not want to force all your messages to be written to the same destination, specify MQOO_BIND_NOT_FIXED on the MQOPEN call. This selects a destination at MQPUT time, that is, on a message-by-message basis.
If you do not specify either MQOO_BIND_ON_OPEN or MQOO_BIND_NOT_FIXED, the default option is MQOO_BIND_AS_Q_DEF. Using MQOO_BIND_AS_Q_DEF causes the binding that is used for the queue handle to be taken from the DefBind queue attribute. See Queue definition commands.
You can also choose a destination queue manager, by specifying its name in the object descriptor on the MQOPEN call. In this way, you can select any queue manager, including the local one.
If you specify one or more of the options MQOO_BROWSE, MQOO_INPUT_*, or MQOO_SET on the MQOPEN call, there must be a local instance of the cluster queue for the open to succeed. If you specify one or more of the options MQOO_OUTPUT, MQOO_BIND_*, or MQOO_INQUIRE on the MQOPEN call, and none of the options MQOO_BROWSE, MQOO_INPUT_*, or MQOO_SET (which always select the local instance) the instance opened is either:
For full details about the MQOPEN call and how to use it, see the WebSphere MQ Application Programming Reference book.
When a queue manager name is resolved at MQOPEN time, the resolved name is returned to the application. If the application tries to use this name on a subsequent MQOPEN call, it might find that it is not authorized to access the name.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
csq68w3 |