Thursday, 21 January 2016

Creating different channel pairs in Websphere MQ using MQSC commands

We will consider to create different channel pairs on two different systems i.e., system1 and system2. For testing purpose System2 will have a queue manager named QM2 with a local Queue LQ2. Similarly System1 will have a queue manager named QM1 with a Remote Queue RQ pointing to QM2 LQ2 along with a transmission queue definition.


The following steps are mandatory before creating any channel pairs.
  1. Create and start the Queue manager in the System1
    1. CRTMQM QM1
    2. STRMQM QM1
  2. Create and start the Queue manager in the System2
    1. CRTMQM QM2
    2. STRMQM QM2
  3. Create a local queue in QM2
    1. RUNMQSC QM2
    2. DEFINE QLOCAL(LQ2)
  4. Create a transmission queue in the QM1
    1. RUNMQSC QM1
    2. DEFINE QLOCAL(TQ) USAGE(XMITQ)
  5. Create a remote queue in the QM1 which points to the local queue in the QM2
    1. DEFINE QREMOTE(RQ) RNAME(LQ2) RQNAME(QM2) XMITQ(TQ)
  6. Create a listener port so that the QM1 and QM2 will be able to communicate
    1. DEFINE LISTENER(QM1_LISTENER) TRPTYPE(TCP) PORT(1419) <- QM1
    2. DEFINE LISTENER(QM2_LISTENER) TRPTYPE(TCP) PORT(1420) <-QM2
    3. START LISTENER QM1_LISTENER
    4. START LISTENER QM2_LISTENER

The following are the steps to create SENDER AND REQUESTER channel pair
  1. Create a SENDER channel in QM1
    1. DEFINE CHANNEL(SDR_RQSTR) CHLTYPE(SDR) CONNAME('system2 IP address(the Qm2 port number )' ) xmitq(TQ)
  2. Create a REQUESTER channel in QM2
    1. DEFINE CHANNEL(SDR_RQSTR) CHLTYPE(RQSTR) CONNAME('system1 ip address(Qm1 port number)') TRPTYPE(TCP)
  3. Start the channels
The following are the steps to create SENDER AND RECEIVER channel pair
  1. Create a SENDER channel in the QM1
    1. DEFINE CHANNEL(SDR_RCVR) CHLTYPE(SDR) CONNAME('system2 IP address(the Qm2 port number )' ) XMITQ(LQ)
  2. Create a RECEIVER channel in QM2
    1. DEFINE CHANNEL(SDR_RCVR) CHLTYPE(RCVR) TRPTYPE(TCP)
  3. Start the channels
The following are the steps to create SERVER AND RECEIVER channel pair
  1. Create a SERVER channel in the QM1
    1. DEFINE CHANNEL(SVR_RCVR) CHLTYPE(SVR) CONNAME('system2 IP address(the Qm2 port number )' ) XMITQ(LQ)
  2. Create a RECEIVER channel in QM2
    1. DEFINE CHANNEL(SVR_RCVR) CHLTYPE(RCVR) TRPTYPE(TCP)
  3. Start the channels
The following are the steps to create SERVER AND REQUESTER channel pair
  1. Create a SERVER channel in the QM1
    1. DEFINE CHANNEL(SVR_RQSTR) CHLTYPE(SVR) CONNAME('system2 IP address(the Qm2 port number )' ) XMITQ(LQ)
  2. Create a REQUESTER channel in QM2
    1. DEFINE CHANNEL(SVR_RQSTR) CHLTYPE(RQSTR) CONNAME('system1 ip address(Qm1 port number)') TRPTYPE(TCP)
  3. Start the channels

No comments :

Post a Comment