Tag Archive | mq multihopping

Multi-hopping with 4 Qmgrs

Just an Extension for Multi-hopping messages between 4  Queue Managers

Reference Links :
1) Distributed MQ communication Part 1
2) Distributed Two Way MQ Communication — Part2
3) MultiHopping with 3 Qmgrs

MultiHopping With 4 Qmgrs

Quick Reference Guide
Multi-hopping with 4 QMGRS , QMA–> QMB–> QMC–> QMD

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)
DEFINE QREMOTE(QMD.RQ) RNAME(QMD.LCQ) RQMNAME(QMD) XMITQ(QMA.XMITQ)
START CHANNEL(QMA.TO.QMB)
DISPLAY CHSTATUS(*)On Queue Manager QMBbash-3.2$ crtmqm QMB
bash-3.2$ strmqm QMB
bash-3.2$ runmqsc QMB
DEFINE LISTENER(QMB.LISTENER) TRPTYPE(TCP) PORT(1420) IPADDR(192.168.111.128)
START LISTENER(QMB.LISTENER)
DEFINE CHANNEL(QMA.TO.QMB) CHLTYPE(RCVR)
DEFINE CHANNEL(QMB.TO.QMC) CHLTYPE (SDR) TRPTYPE(TCP) CONNAME(‘192.168.111.128(1421)’) XMITQ(QMB.XMITQ)
DEFINE QLOCAL(QMB.XMITQ) USAGE(XMITQ)– Qmgr Alias for QMC and QMD
DEFINE QREMOTE(QMC) RQMNAME(QMC) RNAME(”) XMITQ(QMB.XMITQ)
DEFINE QREMOTE(QMD) RQMNAME(QMD) 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)
START LISTENER(QMC.LISTENER)
DEFINE CHANNEL(QMB.TO.QMC) CHLTYPE(RCVR) TRPTYPE(TCP)
DEFINE CHANNEL(QMC.TO.QMD) CHLTYPE (SDR) TRPTYPE(TCP) CONNAME(‘192.168.111.128(1422)’) XMITQ(QMC.XMITQ)
DEFINE QLOCAL(QMC.XMITQ) USAGE(XMITQ)

— Qmgr Alias of QMD
DEFINE QREMOTE(QMD) RQMNAME(QMD) RNAME(”) XMITQ(QMC.XMITQ)
DEFINE QLOCAL(QMC.LCQ)
START CHANNEL(QMB.TO.QMC)
START CHANNEL(QMC.TO.QMD)
DISPLAY CHSTATUS(*)
DISPLAY LSSTATUS(*)

On Queue Manager QMD

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

Testing of MultiHopping on 4 Qmgrs

bash-3.2$ /opt/mqm/samp/bin/amqsput QMD.RQ QMA
Sample AMQSPUT0 start
target queue is QMD.RQ
This is 4 hopping qmgr

Sample AMQSPUT0 end

bash-3.2$ /opt/mqm/samp/bin/amqsget QMD.LCQ QMD
Sample AMQSGET0 start
message

 

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