ObjectQMgrName (MQCHAR48)

This is the name of the queue manager on which the ObjectName object is defined. The characters that are valid in the name are the same as those for ObjectName (see ObjectName (MQCHAR48) ). A name that is entirely blank up to the first null character or the end of the field denotes the queue manager to which the application is connected (the local queue manager).

The following points apply to the types of object indicated:
  • If ObjectType is MQOT_TOPIC, MQOT_NAMELIST, MQOT_PROCESS, or MQOT_Q_MGR, ObjectQMgrName must be blank or the name of the local queue manager.
  • If ObjectName is the name of a model queue, the queue manager creates a dynamic queue with the attributes of the model queue, and returns in the ObjectQMgrName field the name of the queue manager on which the queue is created; this is the name of the local queue manager. A model queue can be specified only on the MQOPEN call; a model queue is not valid on the MQPUT1 call.
  • If ObjectName is the name of a cluster queue, and ObjectQMgrName is blank, the destination of messages sent using the queue handle returned by the MQOPEN call is chosen by the queue manager (or cluster workload exit, if one is installed) as follows:
    • If MQOO_BIND_ON_OPEN is specified, the queue manager selects a particular instance of the cluster queue while processing the MQOPEN call, and all messages put using this queue handle are sent to that instance.
    • If MQOO_BIND_NOT_FIXED is specified, the queue manager can choose a different instance of the destination queue (residing on a different queue manager in the cluster) for each successive MQPUT call that uses this queue handle.

    If the application needs to send a message to a specific instance of a cluster queue (that is, a queue instance that resides on a particular queue manager in the cluster), the application must specify the name of that queue manager in the ObjectQMgrName field. This forces the local queue manager to send the message to the specified destination queue manager.

  • If ObjectName is the name of a shared queue that is owned by the queue-sharing group to which the local queue manager belongs, ObjectQMgrName can be the name of the queue-sharing group, the name of the local queue manager, or blank; the message is placed on the same queue whichever of these values is specified.

    Queue-sharing groups are supported only on z/OS®.

  • If ObjectName is the name of a shared queue that is owned by a remote queue-sharing group (that is, a queue-sharing group to which the local queue manager does not belong), ObjectQMgrName must be the name of the queue-sharing group. You can use the name of a queue manager that belongs to that group, but this can delay the message if that particular queue manager is not available when the message arrives at the queue-sharing group.
  • If the object being opened is a distribution list (that is, RecsPresent is greater than zero), ObjectQMgrName must be blank or the null string. If this condition is not satisfied, the call fails with reason code MQRC_OBJECT_Q_MGR_NAME_ERROR.

This is an input/output field for the MQOPEN call when ObjectName is the name of a model queue, and an input-only field in all other cases. The length of this field is given by MQ_Q_MGR_NAME_LENGTH. The initial value of this field is the null string in C, and 48 blank characters in other programming languages.