Queue Manager Alias

download Queue Manager Alias

of 2

Transcript of Queue Manager Alias

  • 8/8/2019 Queue Manager Alias

    1/2

    Queue Manager Alias

    Queue Manager Aliases enable you to refer to queue managers by more than one name.

    Queue manager alias definitions apply when an application that opens a queue to put a message,specifies the queue name and the queue manager name.

    Queue manager alias definitions have three uses:

    * When sending messages, remapping the queue manager name* When sending messages, altering or specifying the transmission queue* When receiving messages, determining whether the local queue manager is the intended destination forthose messages.

    Queue-manager aliases, which are created using a remote-queue definition with a blank RNAME, havefour uses:

    Remapping the queue-manager name when sending messages

    A queue-manager alias can be used to remap the queue-manager name specified in anMQOPEN call to another queue-manager. This can be a cluster queue manager. For example, aqueue manager might have the queue-manager alias definition:DEFINE QREMOTE(YORK) RNAME(' ') RQMNAME(CLUSQM)

    This defines YORK as a queue-manager name that can be used as an alias for the queuemanager called CLUSQM. When an application on the queue manager that made this definitionputs a message to queue manager YORK, the local queue manager resolves the name toCLUSQM. If the local queue manager is not called CLUSQM, it puts the message on the clustertransmission queue to be moved to CLUSQM, and changes the transmission header to sayCLUSQM instead of YORK.

    Note:

    This does not mean that all queue managers in the cluster resolve the name YORK to CLUSQM.The definition applies only on the queue manager that makes it. To advertise the alias to thewhole cluster, you need to add the CLUSTER attribute to the remote-queue definition. Thenmessages from other queue managers that were destined for YORK are sent to the queuemanager with the alias definition and the alias is resolved.

    Altering or specifying the transmission queue when sending messagesThis method of aliasing can be used to join a cluster to a non-cluster system. For example, forqueue managers in the cluster ITALY to communicate with the queue manager called PALERMO,which is outside the cluster, one of the queue managers in the cluster must act as a gateway.From this queue manager, issue the command:DEFINE QREMOTE(ROME) RNAME(' ') RQMNAME(PALERMO) XMITQ(X)

    CLUSTER(ITALY)

    This is a queue-manager alias definition, which defines and advertises ROME as a queuemanager over which messages from any queue manager in the cluster ITALY can multi-hop toreach their destination at PALERMO. Any message put to a queue opened with the queue-manager name set to ROME in the open handle, is sent to the gateway queue manager, wherethe queue manager alias definition was made. Once there, it is put on the transmission queue Xand moved by conventional, non-cluster channels to the queue manager PALERMO.

    The choice of the name ROME in this example is not significant. The values for QREMOTE and

  • 8/8/2019 Queue Manager Alias

    2/2

    RQMNAME could both be the same.

    Determining the destination when receiving messagesWhen a queue manager receives a message, it looks in the transmission header to see the nameof the destination queue and queue manager. If it has a queue-manager alias definition with thesame name as the queue manager referenced, it substitutes the RQMNAME from its definition for

    the queue manager name in the transmission header.

    There are two reasons for using a queue-manager alias in this way:

    y To direct messages to another queue manager

    y To alter the queue manager name to be the same as the local queue manager

    y

    Using a queue manager as a gateway into the cluster.This enables workload balancing for messages coming from outside the cluster.

    Suppose you have a queue called EDINBURGH on more than one queue manager in the cluster,

    and you want the clustering mechanism to balance the workload for messages coming to thatqueue from outside the cluster.

    A queue manager from outside the cluster needs a transmit queue and sender channel to onequeue manager in the cluster, which is called a gatewayqueue manager. To take advantage ofthe default workload balancing mechanism, the gateway queue managermust not contain aninstance of the EDINBURGH queue.