Establishing communication in a cluster

A channel initiator is needed to start a communication channel when there is a message to deliver. A channel listener waits to start the other end of a channel to receive the message.


Before starting

To establish communication between queue managers in a cluster, configure a link using one of the supported communication protocols. The supported protocols are:

  • TCP or LU 6.2 on any platform
  • NetBIOS or SPX on Windows systems

As part of this configuration, you also need channel initiators and channel listeners just as you do with distributed queuing.


All cluster queue managers need a channel initiator to monitor the system-defined initiation queue SYSTEM.CHANNEL.INITQ. SYSTEM.CHANNEL.INITQ is the initiation queue for all transmission queues including the cluster transmission queue.

Each queue manager must have a channel listener. A channel listener program waits for incoming network requests and starts the appropriate receiver-channel when it is needed. The implementation of channel listeners is platform-specific, however there are some common features.

On all IBM MQ platforms, the listener can be started using the START LISTENER command.

On IBM i, Windows, UNIX and Linux systems, we can start the listener automatically at the same time as the queue manager. To start the listener automatically, set the CONTROL attribute of the LISTENER object to QMGR or STARTONLY.


Procedure

  1. Start the channel initiator.

    • On z/OS, there is one channel initiator for each queue manager and it runs as a separate address space. You start it using the MQSC START CHINIT command, which we issue as part of our queue manager startup.
    • On UNIX, Linux, and Windows, when you start a queue manager, if the queue manager attribute SCHINIT is set to QMGR, a channel initiator is automatically started. Otherwise it can be started using the runmqsc START CHINIT command or the runmqchi control command.
    • On IBM i, when you start a queue manager, if the queue manager attribute SCHINIT is set to QMGR, a channel initiator is automatically started. Otherwise it can be started using the runmqsc START CHINIT command or the runmqchi control command.

  2. Start the channel listener.

    • On z/OS, use the channel listener program provided by IBM MQ. To start an IBM MQ channel listener, use the MQSC command START LISTENER, which we issue as part of our channel initiator startup. For example:
      START LISTENER PORT(1414) TRPTYPE(TCP)
      
      or:
      START LISTENER LUNAME(LONDON.LUNAME) TRPTYPE(LU62)
      

      Members of a queue sharing group can use a shared listener instead of a listener for each queue manager. Do not use shared listeners with clusters. Specifically, do not make the CONNAME of the CLUSRCVR channel the address of the shared listener of the queue sharing group. If you do, queue managers might receive messages for queues for which they do not have a definition.

    • On IBM i, use the channel listener program provided by IBM MQ. To start an IBM MQ channel listener use the CL command STRMQMLSR. For example:
      STRMQMLSR MQMNAME(QM1) PORT(1414)
      
    • On Windows, use either the channel listener program provided by IBM MQ, or the facilities provided by the operating system. To start the IBM MQ channel listener use the RUNMQLSR command. For example:
      RUNMQLSR -t tcp -p 1414 -m QM1
      
    • On UNIX and Linux, use either the channel listener program provided by IBM MQ, or the facilities provided by the operating system; for example, inetd for TCP communications. To start the IBM MQ channel listener use the runmqlsr command. For example:
      runmqlsr -t tcp -p 1414 -m QM1
      
      To use inetd to start channels, configure two files:
      1. Edit the file /etc/services. We must be logged in as a superuser or root. If the following line is not in the file, add it as shown:
        MQSeries    1414/tcp   # WebSphere MQ channel listener
        
        where 1414 is the port number required by IBM MQ. We can change the port number, but it must match the port number specified at the sending end.
      2. Edit the file /etc/inetd.conf. If we do not have the following line in that file, add it as shown:
        MQSeries stream tcp nowait mqm MQ_INSTALLATION_PATH/bin/amqcrsta amqcrsta
        -m queue.manager.name
        
        where MQ_INSTALLATION_PATH is replaced by the high-level directory in which IBM MQ is installed.

      The updates become active after inetd has reread the configuration files. Issue the following commands from the root user ID:

      On AIX :
      refresh -s inetd
      
      On Linux:
      1. Find the process ID of the inetd with the command:
        ps -ef | grep inetd
        
      2. Run the appropriate command.For Linux:
        kill -1 inetd processid
        

Parent topic: Configure a queue manager cluster