Reputation: 81
I'm new to WebSphere MQ. I was practicing the tutorials on the IBM site, I want to know if I need two separate computer machines to send a message to a remote queue? I'm using a laptop, I was wondering if I create another user account, can I use that user account to send message to a remote queue?
Upvotes: 3
Views: 1830
Reputation: 31852
A remote queue in WebSphere MQ terms is simply a queue that exists on another queue manager. You do not need another server, nor even another account. Just define two queue managers on the same server, under the same account and connect them.
crtmqm QMGR1
strmqm QMGR1
crtmqm QMGR2
strmqm QMGR2
runmqsc QMGR1
DEFINE LISTENER(TCP.1414) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR)
START LISTENER(TCP.1414)
DEFINE QL(QMGR2) USAGE(XMITQ) TRIGGER
DEFINE CHL(QMGR1.QMGR2) CHLTYPE(SDR) TRPTYPE(TCP) +
CONNAME('127.0.0.1(1415)') XMITQ(QMGR2) REPLACE
* Next one not needed for the demo but usually there's
* a channel for reply messages to return on.
DEFINE CHL(QMGR2.QMGR1) CHLTYPE(RCVR) TRPTYPE(TCP) REPLACE
START CHL(QMGR1.QMGR2)
DEFINE QREMOTE(TARGET.QUEUE) RQMNAME(QMGR2) RNAME(TARGET.QUEUE)
END
runmqsc QMGR2
DEFINE LISTENER(TCP.1415) TRPTYPE(TCP) PORT(1415) CONTROL(QMGR)
START LISTENER(TCP.1415)
DEFINE QL(QMGR1) USAGE(XMITQ) TRIGGER
DEFINE CHL(QMGR2.QMGR1) CHLTYPE(SDR) TRPTYPE(TCP) +
CONNAME('127.0.0.1(1414)') XMITQ(QMGR1) REPLACE
DEFINE CHL(QMGR1.QMGR2) CHLTYPE(RCVR) TRPTYPE(TCP) REPLACE
DEFINE QL(TARGET.QUEUE)
END
You can have as many QMgrs on one machine as resources allow. I have seem people with as many as 20 QMgrs on a server but one is the recommended number.
If you have WMQ v7.0 or earlier you can have only one installation of WMQ on a machine. If you have v7.1, which is current as of this writing, then it is possible to have multiple installations on the same machine. But either way, all QMgrs on that machine run under the mqm
account (or on Windows, whatever account you installed and run WMQ under).
Upvotes: 4