MQINQ and clusters
Which cluster queue is inquired upon depends upon the options you combine with MQOO_INQUIRE
.
Before you can inquire on a queue, open it using the MQOPEN call and specify MQOO_INQUIRE
.
To inquire on a cluster queue, use the MQOPEN call and combine other options with
MQOO_INQUIRE
. The attributes that can be inquired depend on whether there is a local instance of the cluster queue, and on how the queue is opened:- Combining
MQOO_BROWSE
,MQOO_INPUT_*
, orMQOO_SET
withMQOO_INQUIRE
requires a local instance of the cluster queue for the open to succeed. In this case you can inquire on all the attributes that are valid for local queues. - Combining
MQOO_OUTPUT
withMQOO_INQUIRE
, and specifying none of the preceding options, the instance opened is either:- The instance on the local queue manager, if there is one. In this case you can inquire on all the attributes that are valid for local queues.
- An instance elsewhere in the cluster, if there is no local queue-manager instance. In this case only the following attributes can be inquired on. The QType attribute has the value
MQQT_CLUSTER
in this case.- DefBind
- DefPersistence
- DefPriority
- InhibitPut
- QDesc
- QName
- QType
To inquire on the DefBind attribute of a cluster queue, use the MQINQ call with the selector MQIA_DEF_BIND
. The value returned is either MQBND_BIND_ON_OPEN
or MQBND_BIND_NOT_FIXED
, or MQBND_BIND_ON_GROUP
. Either MQBND_BIND_ON_OPEN
or MQBND_BIND_ON_GROUP
must be specified when using groups with clusters.
To inquire on the CLUSTER and CLUSNL attributes of the local instance of a queue, use the MQINQ call with the selector MQCA_CLUSTER_NAME
or the selector MQCA_CLUSTER_NAMELIST
.
Note: If you open a cluster queue without fixing the queue that MQOPEN has bound to, successive MQINQ calls might inquire on different instances of the cluster queue.