Setting up a cluster using TCP/IP with a single transmission queue per queue manager

This is one of three topics describing different configurations for a simple cluster.

Before you begin

For an overview of the cluster that is being created, see Setting up a new cluster.

The queue manager attribute, DEFCLXQ, must be left as its default value, SCTQ.

About this task

Follow these steps to set up a cluster on Multiplatforms using the transport protocol TCP/IP. [z/OS]On z/OS®, you must follow the instructions in Defining a TCP connection on z/OS to set up the TCP/IP connection , rather than defining the listeners in step 4. Otherwise, the steps are the same for z/OS, but error messages are written to the console, rather than to the queue manager error log.

Procedure

  1. Decide on the organization of the cluster and its name.

    You decided to link the two queue managers, LONDON and NEWYORK, into a cluster. A cluster with only two queue managers offers only marginal benefit over a network that is to use distributed queuing. It is a good way to start and it provides scope for future expansion. When you open new branches of your store, you are able to add the new queue managers to the cluster easily. Adding new queue managers does not disrupt the existing network; see Adding a queue manager to a cluster.

    For the time being, the only application you are running is the inventory application. The cluster name is INVENTORY.

  2. Decide which queue managers are to hold full repositories.

    In any cluster you must nominate at least one queue manager, or preferably two, to hold full repositories. In this example, there are only two queue managers, LONDON and NEWYORK, both of which hold full repositories.

    1. You can perform the remaining steps in any order.
    2. As you proceed through the steps, warning messages might be written to the queue manager log. The messages are a result of missing definitions that you have yet to add.
      
      Examples of the responses to the commands are shown in a box
      like this after each step in this task.
      These examples show the responses returned by IBM MQ for AIX.
      The responses vary on other platforms.
      
    3. Before proceeding with these steps, make sure that the queue managers are started.
  3. Alter the queue manager definitions to add repository definitions.
    On each queue manager that is to hold a full repository, alter the local queue manager definition, using the ALTER QMGR command and specifying the REPOS attribute:
    
    ALTER QMGR REPOS(INVENTORY)
    
    
    1 : ALTER QMGR REPOS(INVENTORY)
    AMQ8005: IBM MQ queue manager changed.
    
    For example, if you enter:
    1. runmqsc LONDON
    2. ALTER QMGR REPOS(INVENTORY)
    LONDON is changed to a full repository.
  4. Define the listeners.

    Define a listener that accepts network requests from other queue managers for every queue manager in the cluster. On the LONDON queue managers, issue the following command:

    
    DEFINE LISTENER(LONDON_LS) TRPTYPE(TCP) CONTROL(QMGR)
    
    The CONTROL attribute ensures that the listener starts and stops when the queue manager does.
    The listener is not started when it is defined, so it must be manually started the first time with the following MQSC command:
    
    START LISTENER(LONDON_LS)
    
    Issue similar commands for all the other queue managers in the cluster, changing the listener name for each one.

    There are several ways to define these listeners, as shown in Listeners.

  5. Define the CLUSRCVR channel for the LONDON queue manager.

    On every queue manager in a cluster, you define a cluster-receiver channel on which the queue manager can receive messages. See Cluster-receiver channel: CLUSRCVR . The CLUSRCVR channel defines the connection name of the queue manager. The connection name is stored in the repositories, where other queue managers can refer to it. The CLUSTER keyword shows the availability of the queue manager to receive messages from other queue managers in the cluster.

    In this example the channel name is INVENTORY.LONDON, and the connection name (CONNAME) is the network address of the machine the queue manager resides on, which is LONDON.CHSTORE.COM. The network address can be entered as an alphanumeric DNS host name, or an IP address in either in IPv4 dotted decimal form. For example, 192.0.2.0, or IPv6 hexadecimal form; for example 2001:DB8:0204:acff:fe97:2c34:fde0:3485. The port number is not specified, so the default port (1414) is used.

    
    DEFINE CHANNEL(INVENTORY.LONDON) CHLTYPE(CLUSRCVR) TRPTYPE(TCP)
    CONNAME(LONDON.CHSTORE.COM) CLUSTER(INVENTORY)
    DESCR('TCP Cluster-receiver channel for queue manager LONDON')
    
    
    1 : DEFINE CHANNEL(INVENTORY.LONDON) CHLTYPE(CLUSRCVR) TRPTYPE(TCP)
    CONNAME(LONDON.CHSTORE.COM) CLUSTER(INVENTORY)
    DESCR('TCP Cluster-receiver channel for queue manager LONDON')
    AMQ8014: WebSphere MQ channel created.
    07/09/98 12:56:35 No repositories for cluster 'INVENTORY'
    
  6. Define the CLUSRCVR channel for the NEWYORK queue manager.
    If the channel listener is using the default port, typically 1414, and the cluster does not include a queue manager on z/OS, you can omit the CONNAME
    
    DEFINE CHANNEL(INVENTORY.NEWYORK) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CLUSTER(INVENTORY)
    DESCR('TCP Cluster-receiver channel for queue manager NEWYORK')
    
  7. Define the CLUSSDR channel on the LONDON queue manager.

    You manually define a CLUSSDR channel from every full repository queue manager to every other full repository queue manager in the cluster. See Cluster-sender channel: CLUSSDR . In this case, there are only two queue managers, both of which hold full repositories. They each need a manually-defined CLUSSDR channel that points to the CLUSRCVR channel defined at the other queue manager. The channel names given on the CLUSSDR definitions must match the channel names on the corresponding CLUSRCVR definitions. When a queue manager has definitions for both a cluster-receiver channel and a cluster-sender channel in the same cluster, the cluster-sender channel is started.

    
    DEFINE CHANNEL(INVENTORY.NEWYORK) CHLTYPE(CLUSSDR) TRPTYPE(TCP)
    CONNAME(NEWYORK.CHSTORE.COM) CLUSTER(INVENTORY)
    DESCR('TCP Cluster-sender channel from LONDON to repository at NEWYORK')
    
    
    1 : DEFINE CHANNEL(INVENTORY.NEWYORK) CHLTYPE(CLUSSDR) TRPTYPE(TCP)
    CONNAME(NEWYORK.CHSTORE.COM) CLUSTER(INVENTORY)
    DESCR('TCP Cluster-sender channel from LONDON to repository at NEWYORK')
    AMQ8014: WebSphere MQ channel created.
    07/09/98 13:00:18  Channel program started.
    
  8. Define the CLUSSDR channel on the NEWYORK queue manager.
    
    DEFINE CHANNEL(INVENTORY.LONDON) CHLTYPE(CLUSSDR) TRPTYPE(TCP)
    CONNAME(LONDON.CHSTORE.COM) CLUSTER(INVENTORY)
    DESCR('TCP Cluster-sender channel from NEWYORK to repository at LONDON')
    
  9. Define the cluster queue INVENTQ
    Define the INVENTQ queue on the NEWYORK queue manager, specifying the CLUSTER keyword.
    
    DEFINE QLOCAL(INVENTQ) CLUSTER(INVENTORY)
    
    
    1 : DEFINE QLOCAL(INVENTQ) CLUSTER(INVENTORY)
    AMQ8006: WebSphere MQ queue created.
    

    The CLUSTER keyword causes the queue to be advertised to the cluster. As soon as the queue is defined it becomes available to the other queue managers in the cluster. They can send messages to it without having to make a remote-queue definition for it.

    All the definitions are complete. On all platforms, start a listener program on each queue manager. The listener program waits for incoming network requests and starts the cluster-receiver channel when it is needed.

What to do next

You are now ready to verify the cluster.