What makes clustering work?


Defining a cluster-sender channel updates the repository of a full repository queue manager and creates a cluster-sender channel back to the local queue manager. A queue manager learns about a cluster and a cluster learns about a queue manager.

While you can define cluster-sender and cluster-receiver channels to the full repository queue manager on every queue manager, it is only strictly necessary to define on one.

For example, queue manager PARIS can messages to the queues at LONDON, because LONDON has defined a cluster-sender channel to it and so introduced itself. PARIS has defined a cluster-sender channel to LONDON, on which it can send messages.

AMSTERDAM has introduced itself to LONDON. Because PARIS also holds a full repository, LONDON has passed on all the information about AMSTERDAM to PARIS. Therefore, PARIS knows what queues are available at AMSTERDAM, and what cluster-receiver channel AMSTERDAM has defined. If PARIS wants to send some messages to queues at AMSTERDAM, it automatically creates a cluster-sender channel connecting to the cluster-receiver channel at AMSTERDAM.

Here is sample code that one would run on LONDON to connect to PARIS:

alter qmgr deadq (SYSTEM.DEAD.LETTER.QUEUE) +
      repos (NAPCLUSTER)

define channel (TO.PARIS) +
       chltype (CLUSSDR) +
       cluster (CLUSTER) +
       trptype (TCP) +
       conname (PARIS) +
       replace

define channel (TO.LONDON) +
       chltype (CLUSRCVR) +
       cluster (CLUSTER) +
       trptype (TCP) +
       conname (LONDON) +
       replace