Platform Framework
R24 AMR | Min(s) read

Installing Multiple Instances of MQ

You need to install a MQ instance in all the servers in which multiple instances of queue manager is required.

Step 1: Creating a Folder Structure on a Network File system Share

On a common Network File System (NFS) share, run the commands below to create a folder structure with the user mqm.

mkdir mqshared
cd mqshared
mkdir qmgrs
mkdir logs
chown -R mqm:mqm  mqshared
chmod -R ug+rwx mqshared

Step 2: Creating the Queue Manager MQT24

To create the queue manager MQT24,

  1. On server 1, run the command below.

    crtmqm -ld …/mqshared/logs -md …/mqshared/qmgrs MQT24

    WebSphere MQ queue manager created.
    Directory '/mnt/noroelshr01/mqshared/qmgrs/MQT24' created.
    The queue manager is associated with installation 'Installation1'.
    Creating or replacing default objects for queue manager 'MQT24'.
    Default objects statistics : 74 created. 0 replaced. 0 failed.
    Completing setup.
    Setup completed.
  2. On server 1, run the commands below to display the information of the Queue Manager MQT24.

    addmqinf -s QueueManager -v Name= MQT24-v Directory= MQT24-v Prefix=/var/mqm -v DataPath=/pocdata/mqshared/qmgrs/ MQT24

    dspmqinf -o command MQT24

  3. On server 2, create the queue manager based on the information from the server 1.

    addmqinf -s QueueManager -v Name= MQT24-v Directory= MQT24-v Prefix=/var/mqm -v DataPath=/pocdata/mqshared/qmgrs/ MQT24

    WebSphere MQ configuration information added.

Step 3: Starting the MQT24 Queue Manager

To start the MQT24 queue manager,

  1. On server 1, run the command below to start the queue manager.

    strmqm -x MQT24

    WebSphere MQ queue manager 'MQT24' starting.
    The queue manager is associated with installation 'Installation1'.
    5 log records accessed on queue manager 'MQT24' during the log replay phase.
    Log replay for queue manager 'MQT24' complete.
    Transaction manager state recovered for queue manager 'MQT24'.
    WebSphere MQ queue manager 'MQT24' started using V8.0.0-4.
  2. On server 2, run the command below to start the queue manager.

    strmqm -x MQT24

    WebSphere MQ queue manager 'MQT24' starting.
    The queue manager is associated with installation 'Installation1'.
    A standby instance of queue manager 'MQT24' has been started. The active
    instance is running elsewhere.

Step 4: Verifying the Cluster

To verify the cluster,

  1. On server 1, run the command below.

    amqmfsck …/mqshared/qmgrs

    The tests on the directory completed successfully.
  2. On server 2, run the command below.

    amqmfsck …/mqshared/qmgrs

    The tests on the directory completed successfully.
  3. On server 1, run the command below to start a second copy of the program with the same parameters on another server.

    amqmfsck –w …/mqshared/qmgrs

    Start a second copy of this program with the same parameters on another server.
    File lock acquired.
    Press Enter or terminate this process to release the lock.
    
    File lock released.
    The tests on the directory completed successfully.
    
  4. Repeat step 3 on server 2.
    Waiting for the file lock.
    Waiting for the file lock.
    Waiting for the file lock.
    Waiting for the file lock.
    Waiting for the file lock.
    Waiting for the file lock.
    Waiting for the file lock.
    File lock acquired.
    Press Enter or terminate this process to release the lock.
    
    File lock released.
    The tests on the directory completed successfully.
    

Step 5: Creating Listener, Channel and Queues

On server 1, use the user mqm on the MQ server and execute the following MQ command to create the Queue Manager MQT24, Channel and queues:

. ./MQCommand

AMQ8110: WebSphere MQ queue manager already exists.
WebSphere MQ queue manager running.
5724-H72 (C) Copyright IBM Corp. 1994, 2011.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager MQT24.

     1 : DEFINE LISTENER('LISTENER.TCP') TRPTYPE(TCP) PORT(1414) CONTROL(QMGR)
AMQ8626: WebSphere MQ listener created.
     2 : START LISTENER('LISTENER.TCP')
AMQ8021: Request to start WebSphere MQ listener accepted.
     3 : DEFINE CHANNEL('SYSTEM.ADMIN.SVRCONN') CHLTYPE(SVRCONN)
AMQ8014: WebSphere MQ channel created.
     4 : DEFINE CHANNEL('T24_CHANNEL') CHLTYPE(SVRCONN)
AMQ8014: WebSphere MQ channel created.
     5 : ALTER QMGR CHLAUTH(DISABLED)
AMQ8005: WebSphere MQ queue manager changed.
       : 
     6 : DEFINE QLOCAL('T24.OFS.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
     7 : DEFINE QLOCAL('T24.OFS.REPLY.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
       : 
     8 : DEFINE QLOCAL('T24.BROWSER.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
     9 : DEFINE QLOCAL('T24.BROWSER.REPLY.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
       : 
    10 : DEFINE QLOCAL('T24.ARC.MOBILE.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
    11 : DEFINE QLOCAL('T24.ARC.MOBILE.REPLY.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
       : 
    12 : DEFINE QLOCAL('T24.TWS.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
    13 : DEFINE QLOCAL('T24.TWS.REPLY.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
       : 
    14 : DEFINE QLOCAL('T24.TCIB.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
    15 : DEFINE QLOCAL('T24.TCIB.REPLY.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
       : 
    16 : DEFINE QLOCAL('T24.TCIB.CORP.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
    17 : DEFINE QLOCAL('T24.TCIB.CORP.REPLY.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
       : 
    18 : DEFINE QLOCAL('T24.TCIB.WEALTH.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
    19 : DEFINE QLOCAL('T24.TCIB.WEALTH.REPLY.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
       : 
    20 : DEFINE QLOCAL('T24.CALLAT.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
    21 : DEFINE QLOCAL('T24.CALLAT.REPLY.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
       : 
    22 : DEFINE QLOCAL('T24.SEAT.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
    23 : DEFINE QLOCAL('T24.SEAT.REPLY.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
       : 
    24 : DEFINE QLOCAL('T24.IF.OUTBOUND.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
    25 : DEFINE QLOCAL('T24.IF.INBOUND.REPLY.QUEUE') DEFPSIST(YES) SHARE
AMQ8006: WebSphere MQ queue created.
       : 
    26 : DEFINE TOPIC('T24.EVENTS.TOPIC') TOPICSTR('/')
AMQ8690: WebSphere MQ topic created.
       : 
26 MQSC commands read.
No commands have a syntax error.
All valid MQSC commands were processed.

Step 6: Creating a Connection Name

On server 1, use the user mqm on the MQ server and create the connection name by using the commands below:

DEFINE CHANNEL('T24_CHANNEL') CHLTYPE(CLNTCONN)  CONNAME('IP(port),IP(port)') QMNAME(MQT24) replace
runmqsc MQT24
DEFINE CHANNEL('T24_CHANNEL') CHLTYPE(CLNTCONN) CONNAME('10.9.237.185(1414), 10.9.237.186(1414)') QMNAME(MQT24) replace
START CHANNEL(T24_CHANNEL)
DISPLAY CHANNEL(T24_CHANNEL)

Step 7: Creating JMS Bindings

You need to create bindings for the application server (except WebSphere Application Server) to connect to WebSPhere MQ.

Create a simple file based Java Naming and Directory Interface (JNDI) context and configure the JMS objects in that JNDI namespace. These JNDI objects are used by the application server to connect to the WebSphere MQ queue manager. The bindings file should be copied to each server running the application server.

Step 8: Displaying the Status of the Queue Manager

To display the status of queue manager,

  1. Run the command below to check the status of the Queue Manager MQT24 on server 1.

    runmqsc MQT24

    DISPLAY QMSTATUS ALL
         1 : DISPLAY QMSTATUS ALL
    AMQ8705: Display Queue Manager Status Details.
       QMNAME(T24QM1)                          STATUS(RUNNING)
       CONNS(21)                               CMDSERV(RUNNING)
       CHINIT(RUNNING)                         INSTNAME(Installation1)
       INSTPATH(/t24app1/mqpoc)                INSTDESC( )
       STANDBY(PERMIT)                         STARTDA(2015-02-12)
       STARTTI(09.58.18)
    
  2. Run the command below to check the standby status of the Queue Manager MQT24 on server 1.

    dspmq -x -o standby -o status

    QMNAME(MQT24)                         STATUS(Running) STANDBY(Permitted)
        INSTANCE(Host1) MODE(Active)
        INSTANCE(Host2) MODE(Standby
    
  3. Run the command below to check the standby status of the Queue Manager MQT24 on server 2.

    dspmq -x -o standby -o status

    QMNAME(MQT24)                         STATUS(Running as standby) STANDBY(Permitted)
        INSTANCE(Host1) MODE(Active)
        INSTANCE(Host2) MODE(Standby
    

Copyright © 2020- Temenos Headquarters SA

Published on :
Monday, May 27, 2024 5:03:29 PM IST