Home

 

Putting across clusters

 

Instead of grouping all your queue managers together in one big cluster, we can have many smaller clusters with one or more queue managers in each acting as a bridge. The advantage of this is that we can restrict the visibility of queue and queue-manager names across the clusters. (See Overlapping clusters.) We can use aliases to change the names of queues and queue managers to avoid name conflicts or to comply with local naming conventions.

Figure 1. Bridging across clusters

Figure 1 shows two clusters with a bridge between them. (There could be more than one bridge.) QM1 has defined a cluster queue Q1, as follows:

DEFINE QLOCAL(Q1) CLUSTER(CORNISH)

QM3 has defined a cluster queue Q3, as follows:

DEFINE QLOCAL(Q3) CLUSTER(WINDSOR)

QM2 has created a namelist called CORNISHWINDSOR, containing the names of both clusters:

DEFINE NAMELIST(CORNISHWINDSOR)
 DESCR('CornishWindsor namelist')
 NAMES(CORNISH, WINDSOR)

QM2 has also defined a cluster queue Q2, as follows:

DEFINE QLOCAL(Q2) CLUSNL(CORNISHWINDSOR)

QM2 is a member of both clusters and is the bridge between them. For each queue that you want to make visible across the bridge, we need a QALIAS definition on the bridge. For example in Figure 1, on QM2, we need:

DEFINE QALIAS(MYQ3) TARGQ(Q3) CLUSTER(CORNISH) DEFBIND(NOTFIXED)

This means that an application connected to a queue manager in CORNISH (for example QM1), can put a message to a queue, which it refers to as MYQ3, and this message is routed to Q3 at QM3.

When you open a queue we need to set DEFBIND to either (NOTFIXED) or (QDEF) because if it is left as the default (OPEN) the queue manager will resolve the alias definition to the bridge queue manager that hosts it, and the bridge will not forward the message on.

For each queue manager that you want to make visible, we need a queue-manager alias definition. For example on QM2 we need:

DEFINE QREMOTE(QM1) RNAME(' ') RQMNAME(QM1) CLUSTER(WINDSOR)

This means that an application connected to any queue manager in WINDSOR (for example QM3), can put a message to any queue on QM1, by naming QM1 explicitly on the MQOPEN call.

 

Parent topic:

Examples of using aliases within clusters


qc10900_


 

Home