Configuring a multi-instance WebSphere MQ

In a multi-instance WebSphere® MQ configuration, one instance is an active WebSphere MQ instance and the other is a standby instance. If the active instance fails, the standby instance starts working.

Ensure that the PATH variable is set to the WebSphere MQ installation bin directory by running the .bash_profile.

The server that starts first becomes active server and the other server becomes the standby server.

You must complete the steps for each data center. For example, if there are two DCs, you must create two queue managers called QM1 and QM2.

To create a multi-instance WebSphere MQ configuration, complete the following steps:

  1. On the active server, log in as the root user, and run the su mqm command.
  2. Run the following commands:
    crtmqm -ld /usr/local/share/HA/logs -md /usr/local/share/HA/qmgrs -q <name of the queue manager>
    dspmqinf -o command <name of the queue manager>.
  3. Copy the output of the command.

    The following code is an example of the command output.

    addmqinf -s QueueManager -v Name=<name of the queue manager> -v Directory=<directory name> -v
    Prefix=/var/mqm -v DataPath=/usr/local/share/HA/qmgrs/QM1_DC1
  4. Run the following commands:
    strmqm -x <name of the queue manager>
    runmqsc <name of the queue manager>
    
    DEF LISTENER(TCPLISTENER) TRPTYPE(TCP) PORT(1514) CONTROL(QMGR)
    START LISTENER(TCPLISTENER)
    set CHLAUTH(*) TYPE(BLOCKUSER) USERLIST(*MQADMIN) ACTION(REMOVE)
    ALTER QMGR CHLAUTH(DISABLED)
    END
  5. On the standby server, log in as the root user.
  6. Paste the output of the command that you ran in step 2, and run the following command:
    strmqm -x <name of the queue manager>