|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Gateway in a Cluster using Queue Manager Alias |
« View previous topic :: View next topic » |
Author |
Message
|
ckrisasa |
Posted: Mon Sep 28, 2015 6:02 am Post subject: Gateway in a Cluster using Queue Manager Alias |
|
|
Newbie
Joined: 26 Sep 2015 Posts: 9
|
I'm trying to implement a scenario which follows:
1. I have 4 cluster members. [2 FRs (MERCURY, VENUS) and 2 PRs (EARTH, MARS)]
2. I want MARS as a Cluster Gateway so that Cluster members communicate to outside world through it.
3. QMGRs outside Cluster -> JUPITER, URANUS and SATURN
4. Three different applications local to three Cluster members (MERCURY, VENUS, EARTH) will put messages to Remote Queues of respective QMGRs.
5. These remote queues are pointed to local queues of QMGRS outside Cluster (JUPITER, SATURN, URANUS), however through ALIAS QMGR which is defined in MARS QMGR.
All The Channels and Listeners are UP and RUNNING. But I'm getting following error, when trying to put message in Remote Queues of 3 Cluster Members. For an instance, I'm trying to put message in Remote Queue of MERCURY QMGR.
Error Code:
Quote: |
Sample AMQSPUT0 start
target queue is QUEUE.MERCURY
MQOPEN ended with reason code 2087
unable to open queue for output
|
But in MQ Explorer, I noticed no any transmit queues are created for cluster. Why?
My Infrastructure:
Quote: |
Mercury:
ALTER QMGR REPOS(PLANETS)
DEFINE QR(QUEUE.MERCURY) RNAME(QUEUE.JUPITER) RQMNAME(JUPITER) CLUSTER(PLANETS) REPLACE
DEFINE CHL(TO.MERCURY) CHLTYPE(CLUSRCVR) CONNAME('LOCALHOST(1414)') CLUSTER(PLANETS)
DEFINE CHL(TO.VENUS) CHLTYPE(CLUSSDR) CONNAME('LOCALHOST(1515)') CLUSTER(PLANETS)
DEFINE LSTR(MERCURY.LISTENER) TRPTYPE(TCP) PORT(1414)
START LISTENER(MERCURY.LISTENER)
END
Venus:
ALTER QMGR REPOS(PLANETS)
DEFINE QR(QUEUE.VENUS) RNAME(QUEUE.SATURN) RQMNAME(SATURN) CLUSTER(PLANETS) REPLACE
DEFINE CHL(TO.VENUS) CHLTYPE(CLUSRCVR) CONNAME('LOCALHOST(1515)') CLUSTER(PLANETS)
DEFINE CHL(TO.MERCURY) CHLTYPE(CLUSSDR) CONNAME('LOCALHOST(1414)') CLUSTER(PLANETS)
DEFINE LSTR(VENUS.LISTENER) TRPTYPE(TCP) PORT(1515)
START LISTENER(VENUS.LISTENER)
END
Earth:
DEFINE QR(QUEUE.EARTH) RNAME(QUEUE.URANUS) RQMNAME(URANUS) CLUSTER(PLANETS) REPLACE
DEFINE CHL(TO.EARTH) CHLTYPE(CLUSRCVR) CONNAME('LOCALHOST(1616)') CLUSTER(PLANETS)
DEFINE CHL(TO.MERCURY) CHLTYPE(CLUSSDR) CONNAME('LOCALHOST(1414)') CLUSTER(PLANETS)
DEFINE LSTR(EARTH.LISTENER) TRPTYPE(TCP) PORT(1616)
START LISTENER(EARTH.LISTENER)
END
Mars:
DEFINE QL(MARS.JUPITER.XMIT) USAGE(XMITQ)
DEFINE QL(MARS.SATURN.XMIT) USAGE(XMITQ)
DEFINE QL(MARS.URANUS.XMIT) USAGE(XMITQ)
DEFINE QR(JUPITER) RQMNAME(JUPITER) RNAME(' ') XMITQ(MARS.JUPITER.XMIT)
DEFINE QR(SATURN) RQMNAME(SATURN) RNAME(' ') XMITQ(MARS.SATURN.XMIT)
DEFINE QR(URANUS) RQMNAME(URANUS) RNAME(' ') XMITQ(MARS.URANUS.XMIT)
DEFINE CHL(TO.MARS) CHLTYPE(CLUSRCVR) CONNAME('LOCALHOST(1717)') CLUSTER(PLANETS)
DEFINE CHL(TO.VENUS) CHLTYPE(CLUSSDR) CONNAME('LOCALHOST(1515)') CLUSTER(PLANETS)
DEFINE CHL(MARS.JUPITER) CHLTYPE(SDR) CONNAME('LOCALHOST(1818)') XMITQ(MARS.JUPITER.XMIT)
DEFINE CHL(MARS.SATURN) CHLTYPE(SDR) CONNAME('LOCALHOST(1919)') XMITQ(MARS.SATURN.XMIT)
DEFINE CHL(MARS.URANUS) CHLTYPE(SDR) CONNAME('LOCALHOST(2020)') XMITQ(MARS.URANUS.XMIT)
DEFINE LISTENER(VENUS.LISTENER) TRPTYPE(TCP) PORT(1717)
START LISTENER(VENUS.LISTENER)
START CHANNEL(MARS.JUPITER)
START CHANNEL(MARS.SATURN)
START CHANNEL(MARS.URANUS)
END
Jupiter:
DEFINE QL(QUEUE.JUPITER)
DEFINE CHL(MARS.JUPITER) CHLTYPE(RCVR) TRPTYPE(TCP)
DEFINE LISTENER(MARS.JUPITER.LISTENER) TRPTYPE(TCP) PORT(1818)
START CHANNEL(MARS.JUPITER)
START LISTENER(MARS.JUPITER.LISTENER)
END
Saturn:
DEFINE QL(QUEUE.SATURN)
DEFINE CHL(MARS.SATURN) CHLTYPE(RCVR) TRPTYPE(TCP)
DEFINE LISTENER(MARS.SATURN.LISTENER) TRPTYPE(TCP) PORT(1919)
START CHANNEL(MARS.SATURN)
START LISTENER(MARS.SATURN.LISTENER)
END
Uranus:
DEFINE QL(QUEUE.URANUS)
DEFINE CHL(MARS.URANUS) CHLTYPE(RCVR) TRPTYPE(TCP)
DEFINE LSTR(MARS.URANUS.LISTENER) TRPTYPE(TCP) PORT(2020)
START CHANNEL(MARS.URANUS)
START LISTENER(MARS.URANUS.LISTENER)
END
|
Can someone please rectify me what's wrong I did here?
1. Do we need to create AliasQueue here? But alias queues are meant for local queus, right? Please correct me if I'm wrong.
2. Do we need to create a channel along with transmit queue info to Mars from other cluster member? But it will hide the cluster benefits right?
3. I know I didn't mention transmit queue for any of the remote queues in cluster members. But that should be the job of Cluster right? It should use same transmit queue for all remote queues with in the cluster unless we SAY to use different transmission queues. |
|
Back to top |
|
 |
exerk |
Posted: Mon Sep 28, 2015 6:24 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Doing this, DEFINE QL(MARS.JUPITER.XMIT) USAGE(XMITQ), you're ripping out the 'native' routing inherent to MQ. Better to just use the queue manager name for the XMITQ, e.g. in queue manager MARS your XMITQ would be named JUPITER.
Also, perhaps you might want to think of where you should define the QUEUE.MERCURY QR. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
ckrisasa |
Posted: Mon Sep 28, 2015 8:23 am Post subject: |
|
|
Newbie
Joined: 26 Sep 2015 Posts: 9
|
exerk wrote: |
Doing this, DEFINE QL(MARS.JUPITER.XMIT) USAGE(XMITQ), you're ripping out the 'native' routing inherent to MQ. Better to just use the queue manager name for the XMITQ, e.g. in queue manager MARS your XMITQ would be named JUPITER.
Also, perhaps you might want to think of where you should define the QUEUE.MERCURY QR. |
Thanks exerk for your reply. I tried to create a QR object as you mentioned. Since already QL is defined with the same name, it is saying, MQ object is already exists.
Can you help me with a altered piece of code, if possible? I'm trying to learn MQ since few days. I understood to some extent. My only source is this blog apart from Knowedge center.
P.S: In non-clustered scenario, I successfully able to create Alias QMGR for hopping the message. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Sep 28, 2015 9:04 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Please search google for IBM's mq+primer. Download and read to get some knowledge of mq fundamentals. Clusters are an advanced topic. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Sep 28, 2015 9:06 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Try this for MARS
Code: |
Mars:
DEFINE QL(MARS.JUPITER.XMIT) USAGE(XMITQ)
DEFINE QL(MARS.SATURN.XMIT) USAGE(XMITQ)
DEFINE QL(MARS.URANUS.XMIT) USAGE(XMITQ)
DEFINE QR(JUPITER) RQMNAME(JUPITER) RNAME(' ') XMITQ(MARS.JUPITER.XMIT) CLUSTER(PLANETS)
DEFINE QR(SATURN) RQMNAME(SATURN) RNAME(' ') XMITQ(MARS.SATURN.XMIT) CLUSTER(PLANETS)
DEFINE QR(URANUS) RQMNAME(URANUS) RNAME(' ') XMITQ(MARS.URANUS.XMIT) CLUSTER(PLANETS)
DEFINE CHL(TO.MARS) CHLTYPE(CLUSRCVR) CONNAME('LOCALHOST(1717)') CLUSTER(PLANETS)
DEFINE CHL(TO.VENUS) CHLTYPE(CLUSSDR) CONNAME('LOCALHOST(1515)') CLUSTER(PLANETS)
DEFINE CHL(MARS.JUPITER) CHLTYPE(SDR) CONNAME('LOCALHOST(1818)') XMITQ(MARS.JUPITER.XMIT)
DEFINE CHL(MARS.SATURN) CHLTYPE(SDR) CONNAME('LOCALHOST(1919)') XMITQ(MARS.SATURN.XMIT)
DEFINE CHL(MARS.URANUS) CHLTYPE(SDR) CONNAME('LOCALHOST(2020)') XMITQ(MARS.URANUS.XMIT)
DEFINE LISTENER(VENUS.LISTENER) TRPTYPE(TCP) PORT(1717)
START LISTENER(VENUS.LISTENER)
START CHANNEL(MARS.JUPITER)
START CHANNEL(MARS.SATURN)
START CHANNEL(MARS.URANUS)
END |
Note that the Alias to qmgrs outside the cluster now have a cluster attribute.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
exerk |
Posted: Mon Sep 28, 2015 9:12 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
It seems to me that you are trying to run before you have learned to crawl, let alone walk!
Your statement "...I tried to create a QR object as you mentioned. Since already QL is defined with the same name, it is saying, MQ object is already exists..." makes no sense unless you are trying to define QUEUE.MERCURY as a QL in queue manager JUPITER, and if you're trying to do that you have not understood where to define the QUEUE.MERCURY QR, or how to replace same-named objects with a different object type if necessary..
You've gone from a simple explicit point-to-point topology (which you had trouble with) to an advanced clustering topology, which you're having trouble with. I admire your thirst for knowledge and getting to grips with the product but I think you're going to tie yourself in knots trying to unravel it - and you haven't even got to the part about sending stuff into the cluster from a queue manager that's outside of it.
Don't be put off by that statement, or think I'm denigrating your efforts because I'm not - I just think it would be a more sensible for you to take a more manageable bite-sized approach to your learning.
EDIT: And have just seen fjb_sapers answer, which demonstrates that there's more than one way of doing it! _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
ckrisasa |
Posted: Mon Sep 28, 2015 9:28 am Post subject: |
|
|
Newbie
Joined: 26 Sep 2015 Posts: 9
|
Sorry if I sounded dumb. I'm reading knolwdge center and understood the scenarios. I read basics of MQ and its objects.
This subject looks familiar yet confusing me. Thanks for the suggestion, I will try to take it in bits and pieces.
I'm a WAS Administrator, love to be a MQ/MB Admin as well. |
|
Back to top |
|
 |
exerk |
Posted: Mon Sep 28, 2015 9:34 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
ckrisasa wrote: |
I'm a WAS Administrator, love to be a MQ/MB Admin as well. |
Jack of all trades, master of none
I admire you, and you in no way sound dumb. Me, I'm a one-trick pony - MQ only. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Oct 01, 2015 5:32 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I did a stint as a WAS admin.
I've made efforts to forget it all.
 _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|