MultiHopping with 3 Websphere MQ Qmgrs

Requirement : To set up a minimal steps for a Two Way MQ communication between two queue managers ie From QMA to  QMB & From QMB to QMC

Reference Links :
1) Distributed MQ communication Part 1
2) Distributed Two Way MQ Communication — Part2

Passing the messages between more than one intermediate queue managers is called Multi-Hopping. Multi-hopping occurs when a message needs to traverse one or more queue-managers in order to reach the destination queue-manager.

The Setup in which a QMGR is networked with the next QMGR which is networked to the next QMGR ie  (QMA -> QMB -> QMC -> QMD -> QME).

If a message is created on QMA, and the destination queue-manager is on QME, then the message must flow from QMB to QMC, to QMD to QME.

QMB and QMC will need a queue-manager aliases since they are non-adjacent (don’t have a transmission queue) to the destination queue-manager.

QMB needs a definition to move the message from QMB to the next hop QMC. and so on

So, when the message arrives on QMB, a queue-manager alias must exist to resolve the queue-manager name in the XQH (transmission queue header):
DEF QR(QME) RQMname(QME) XMITQ(QMC).

This definition tells the MCA (message channel agent) on QMB to move the message to transmission queue named QMC, so that the message will be sent to QMC.

When the message arrives on QMC, again a queue-manager alias will be need to be defined  to move the message to a transmission queue named QMD:
DEF QR(QME) RQMname(QME) XMITQ(QMD).

So QMA doesn’t know any thing about QME so by defining the QM alias the message is reached to the destination QME.

The only thing and the only route that QMA knows is how to get to QMB. Everything else is resolved at QMB. So as long as QMB is *secured*, then no application can send messages to QMC without going through QMB
Env Architecture :
OS : Linux Redhat 5.6
MQ Version : 7.0

Capture1

Quick Reference Commands  for Multi Hopping with 3 QMGRS

On Queue Manager QMA

bash-3.2$crtmqm QMA
bash-3.2$strmqm QMA
bash-3.2$ runmqsc QMA
DEFINE QLOCAL(QMA.XMITQ) USAGE(XMITQ)
DEFINE CHANNEL(QMA.TO.QMB) CHLTYPE(SDR) CONNAME(‘192.168.111.128(1420)’) XMITQ(QMA.XMITQ)
DEFINE QREMOTE(QMC.RQ) RNAME(QMC.LCQ) RQMNAME(QMC) XMITQ(QMA.XMITQ)
START CHANNEL(QMA.TO.QMB)
DISPLAY CHSTATUS(*)

On Queue Manager QMB

bash-3.2$crtmqm QMB
bash-3.2$strmqm QMB
bash-3.2$ runmqsc QMB
DEFINE CHANNEL(QMA.TO.QMB) CHLTYPE(RCVR)
DEFINE QLOCAL(QMB.XMITQ) USAGE(XMITQ)
DEFINE LISTENER(QMB.LISTENER) TRPTYPE(TCP) PORT(1420) IPADDR(192.168.111.128)
START LISTENER(QMB.LISTENER)
DEFINE CHANNEL(QMB.TO.QMC) CHLTYPE (SDR) TRPTYPE(TCP) CONNAME(‘192.168.111.128(1421)’) XMITQ(QMB.XMITQ)

— Qmgr Alias needs to be set in the QMB

DEFINE QREMOTE(QMC) RQMNAME(QMC) RNAME(”) XMITQ(QMB.XMITQ)
START CHANNEL(QMA.TO.QMB)
START CHANNEL(QMB.TO.QMC)
DISPLAY CHSTATUS(*)
DISPLAY LSSTATUS(*)

On Queue Manager QMC

bash-3.2$crtmqm QMC
bash-3.2$strmqm QMC
bash-3.2$ runmqsc QMC
DEFINE LISTENER(QMC.LISTENER) TRPTYPE(TCP) PORT(1421) IPADDR(192.168.111.128)
DEFINE CHANNEL(QMB.TO.QMC) CHLTYPE(RCVR) TRPTYPE(TCP)
START LISTENER(QMC.LISTENER)
DEFINE QLOCAL(QMC.LCQ)
START CHANNEL(QMB.TO.QMC)
DISPLAY CHSTATUS(*)
DISPLAY LSSTATUS(*)

Testing of MultiHopping

bash-3.2$ pwd
/opt/mqm/samp/bin
bash-3.2$ ./amqsput QMC.RQ QMA
Sample AMQSPUT0 start
target queue is QMC.RQ
This is a test

Sample AMQSPUT0 end
bash-3.2$ ./amqsbcg QMC.LCQ QMC

 

To get automated mail updates of my Posts..
Please subscribe to the site http://webspherepundit.com
And also like the Facebook Page
https://www.facebook.com/webspherepundit

 

Leave a Reply

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