WebSphere MQ

Establish Connectivity between 2 Queue Managers

To transfer messages from one queue manager to the other, you need to take help of sender and receiver channels. Here is how you configure them:

Create the Sender Channel at the sending Queue Manager names qmgr1

DEFINE CHANNEL(qmgr1.qmgr2) CHLTYPE(SDR) XMITQ(MYXMITQ) CONNAME(‘<QMGR2_IP>(1414)’)

You need to replace the QMGR2_IP with the IP of the target server

Create the transmit queue in qmgr1

DEF QL(MYXMITQ) DEFPSIST(YES) USAGE(XMITQ)

Create the Receiver Channel in qmgr2 with the exact same name

DEFINE CHANNEL(qmgr1.qmgr2) CHLTYPE(RCVR)

Start the sender and he receiver channels

START CHANNEL(<channel_name>)

Define the remote queue

DEFINE QREMOTE(QMGR1.QMGR2.QUEUE) RNAME(QMGR2.QUEUE) RQMNAME(QMGR2) XMITQ(MYXMITQ)

Few Important Points

  1. The state of the receiver channel is controlled by the sender channel
  2. When the sender channel is started, the receiver channel automatically goes into RUNNING state
  3. However, a start command should already be issued at the receiver channel before the send channel can connect

Leave a Reply

Your email address will not be published. Required fields are marked *