Create a new uniform cluster

How you create a new uniform cluster.


Procedure

  1. Create a file that describes how we want the cluster itself to look in terms of full repositories. As for any cluster, two full repositories act as central stores of information about the cluster. Specifically, we need to describe the names and connection names for the two full repositories in this cluster. Note: This is being done in advance of anything (including the queue managers) being created, and the following process below includes creating those queue managers. For example, imagine we are setting up a uniform cluster called UNICLUS, with queue manager members QMA, QMB, QMC and QMD. In this example, QMA and QMB will be the full repositories, with QMC and QMD as partial repositories. A sample configuration file, uniclus.ini:
    AutoCluster:
       Repository2Conname=QMA.dnsname(1414)
       Repository2Name=QMA
       Repository1Conname=QMB.dnsname(1414)
       Repository1Name=QMB
       ClusterName=UNICLUS
       Type=Uniform
    
    The RepositoryNConname fields are used as the conname attribute for other cluster members to define cluster senders (CLUSSDR) to them, and can be a connection list for a multi instance queue manager and can optionally include the port.
  2. Create a sample configuration file, uniclus.mqsc which contains the MQSC definitions we want to be applied to all cluster members. There is one mandatory line needed in this file, which is a definition of a cluster receiver channel (CLUSRCVR), with a CLUSTER attribute of the automatic cluster name (usually through the +AUTOCL+ insert) and a channel name which includes the +QMNAME+ insert. This describes how other members of the uniform cluster connect to each queue manager and is used as a template of how to connect to the other queue managers as well. An example definition might be something like:
    define channel('+AUTOCL+_+QMNAME+') chltype(clusrcvr) trptype(tcp) 
    conname('+<VARIABLE>+') cluster('+AUTOCL+') replace
    When automatic clusters are configured, a definition of a cluster receiver channel can use some additional inserts in the CLUSTER, CONNAME, and CHANNEL fields to enable the definition to be identical on all queue managers in the uniform cluster. This includes:

      +AUTOCL+
      The automatic cluster name

      +QMNAME+
      The name of the queue manager being created

      +VARIABLE+
      Any <variable name> defined during queue manager creation or in the Variables qm.ini stanza, for example +CONNAME+

    Remember that channel names are limited to 20 characters, and so the value both with the inserts in, as well as when the inserts are replaced, needs to fit that limitation. An example file might look like the following:

    *##########################################################################
    * Compulsory section for all uniform cluster queue managers
    *##########################################################################
    define channel('+AUTOCL+_+QMNAME+') chltype(clusrcvr) trptype(tcp) conname('+CONNAME+') cluster('+AUTOCL+') replace
    *
    *##########################################################################
    * Configuration for all queue managers
    *##########################################################################
    define QL(APPQ) maxdepth(99999999) replace
    define QL(APPQ2) maxdepth(99999999) replace
    define channel(CLIENTCHL) chltype(svrconn) trptype(tcp) replace
    
    
  3. Make these two files available on each machine that will host a uniform cluster member. For example, /shared/uniclus.ini and /shared/uniclus.mqsc.
  4. On each of those machines, create the queue manager. On the command line, supply:
    1. A request to start a listener, on the expected port
    2. A request for automatic INI configuration (-ii) pointing to the automatic cluster setup file (uniclus.ini)
    3. A request for automatic MQSC configuration (-ic) pointing to the MQSC configuration file which includes a CLUSRCVR definition for the uniform cluster.
    4. A variable for the CONNAME for this queue manager

    On the host for QMA:

    crtmqm -p 1414 -ii /shared/uniclus.ini -ic /shared/uniclus.mqsc -iv 
    CONNAME=QMA.dnsname(1414) QMA
    strmqm QMA
    
    Each queue manager in the uniform cluster is created with an almost identical command line - all the differences between full and partial repository are handled automatically for a uniform cluster.On the host for QMB:
    crtmqm -p 1414 -ii /shared/uniclus.ini -ic /shared/uniclus.mqsc -iv 
    CONNAME=QMB.dnsname(1414) QMB
    strmqm QMB
    
    On the host for QMC:
    crtmqm -p 1414 -ii /shared/uniclus.ini -ic /shared/uniclus.mqsc -iv 
    CONNAME=QMC.dnsname(1414) QMB
    strmqm QMC
    
    On the host for QMD:
    crtmqm -p 1414 -ii /shared/uniclus.ini -ic /shared/uniclus.mqsc -iv 
    CONNAME=QMD.dnsname(1414) QMB
    strmqm QMD
    What happens automatically:

    As the queue manager is started, the definitions from the uniclus.ini file are applied to the qm.ini file. For more information, see Automatic configuration of qm.ini at startup. This adds the AutoCluster definition into the qm.ini file.

    If the queue manager is named in the AutoCluster stanza as one of the full repositories, then it is automatically converted to be a full repository, similar to issuing the MQSC command ALTER QMGR REPOS(clustername), otherwise it is converted to a partial repository, similar to issuing the MQSC command ALTER QMGR REPOS(‘ ').

    When the define of the cluster receiver channel for the automatic cluster is processed, cluster sender channels are defined from this queue manager to all full repositories in the AutoCluster stanza (excluding the local queue manager if this is one of the full repositories). These sender channels inherit all common channel attributes from the local cluster receiver which has been defined.Attention: Although the channels are created without further manual intervention, these are administrative channel objects which can be displayed and managed as for any other channel definition. We should not confuse these objects with 'auto-defined' cluster sender channels, created transiently and on-demand by the cluster to route message traffic.


What to do next

Verify the uniform cluster setup

When the ClusterName parameter is set correctly, and the queue manager is a member of the named cluster, message AMQ9883 is issued to confirm that the cluster is now identified as a uniform cluster.

We can then use uniform cluster capabilities, such as automatic application balancing. During queue manager startup, if this parameter has been set, but the name is not a valid IBM MQ cluster name, the name is ignored and error message AMQ9882 issued.

If the name is a valid cluster name, but no cluster channels for the identified cluster exist, warning message AMQ9881 is issued to the queue manager error log to allow your administrator to identify and correct this situation.

Verify the automated cluster setup

If we have used automatic cluster support to set up the uniform cluster, we can verify that the queue managers specified as full repositories are now correctly configured as such, using runmqsc commands:
QMA:
     1 : dis qmgr repos
AMQ8408I: Display Queue Manager details.
   QMNAME(QMA)                             REPOS(UNICLUS)
Whereas partial repositories are not configured as repositories:
QMC:
     1 : dis qmgr repos
AMQ8408I: Display Queue Manager details.
   QMNAME(QMC)                             REPOS( )
In addition, we should be able to see that cluster sender channels (CLUSSDR) have been configured from each queue manager to the other full repositories, using the channel name from the configuration MQSC file:
QMA:
     1 : dis chl(UNICLUS*) conname
AMQ8414I: Display Channel details.
   CHANNEL(UNICLUS_QMA)                    CHLTYPE(CLUSRCVR)
   CONNAME(QMA.dnsname(1414))
AMQ8414I: Display Channel details.
   CHANNEL(UNICLUS_QMB)                    CHLTYPE(CLUSSDR)
   CONNAME(QMB.dnsname(1414))

QMC:
     1 : dis chl(UNICLUS*) conname
AMQ8414I: Display Channel details.
   CHANNEL(UNICLUS_QMA)                    CHLTYPE(CLUSSDR)
   CONNAME(QMA.dnsname(1414))
AMQ8414I: Display Channel details.
   CHANNEL(UNICLUS_QMB)                    CHLTYPE(CLUSSDR)
   CONNAME(QMB.dnsname(1414))
AMQ8414I: Display Channel details.
   CHANNEL(UNICLUS_QMC)                    CHLTYPE(CLUSRCVR)
   CONNAME(QMC.dnsname(1414))
Parent topic: Create a uniform cluster


Related concepts