Home

 

Usage notes

 

  1. For local queues

    1. If you define a local queue with QSGDISP(SHARED) and another queue manager in the queue-sharing group already has a local version of a queue with the same name (it can be of type QLOCAL, QREMOTE, or QALIAS and will have QSGDISP(QMGR)), the definition will complete normally. However, when you try to access the locally-defined queue, it will fail with reason code 2343 (MQRC_OBJECT_NOT_UNIQUE).

      To resolve this, delete one of the queues using the DELETE command. If the queue you want to delete contains messages, we can use the PURGE option or remove the messages first using the MOVE command.

      For example, if you want to delete the QSGDISP(LOCAL) version, which contains messages, and you want to copy those messages to the QSGDISP(SHARED) version, then issue commands like the following:

      MOVE QLOCAL(QUEUE.1) QSGDISP(PRIVATE) TOQLOCAL(QUEUE.1) TYPE(ADD)
      DELETE QLOCAL(QUEUE.1) QSGDISP(QMGR)

  2. For alias queues:

    1. DEFINE QALIAS(otherqname) TARGQ(aliasqueue) CLUSTER(c) has the effect of advertising queue aliasqueue by the name otherqname.

    2. DEFINE QALIAS(otherqname) TARGQ(aliasqueue) has the effect of allowing a queue advertised by the name otherqname to be used on this queue manager by the name aliasqueue.

  3. For remote queues:

    1. DEFINE QREMOTE(rqueue) RNAME(otherq) RQMNAME(otherqm) CLUSTER(cl) has the effect of advertising this queue manager as a store and forward gateway to which messages for queue rqueue can be sent. It has no effect as a reply-to queue alias, except on the local queue manager.

      DEFINE QREMOTE(otherqm) RNAME() RQMNAME(anotherqm) XMITQ(xq) CLUSTER has the effect of advertising this queue manager as a store and forward gateway to which messages for anotherqm can be sent.

    2. RQMNAME can itself be the name of a cluster queue manager within the cluster, thus (as with QALIAS definitions) we can map the advertised queue manager name to another name locally.

    3. It is possible for the values of RQMNAME and QREMOTE to be the same if RQMNAME is itself a cluster queue manager. If this definition is also advertised using a CLUSTER attribute, do not choose the local queue manager in the cluster workload exit because a cyclic definition will result.

    4. Remote queues do not have to be defined locally. The advantage of doing so is that applications can refer to the queue by a simple, locally-defined name, rather than by one that is qualified by the ID of the queue manager on which the queue resides. This means that applications do not need to be aware of the real location of the queue.

    5. A remote queue definition can also be used as a mechanism for holding a queue manager alias definition, or a reply-to queue alias definition. The name of the definition in these cases is:

      • The queue manager name being used as the alias for another queue manager name (queue manager alias), or

      • The queue name being used as the alias for the reply-to queue (reply-to queue alias).

 

Parent topic:

DEFINE queues


sc11250_


 

Home