Author |
Message
|
XinDHA |
Posted: Wed Apr 18, 2018 5:17 am Post subject: How to send reply messages via Gateway Queue Manager? |
|
|
Newbie
Joined: 18 Apr 2018 Posts: 8
|
Hello everybody,
I have following MQ scenario: A partner sends messages to my Gateway Queue Manager (GWQM), which then routes the messages to an internal Queue Manager (QM). A Java Client application is connected to the QM and processes this messages. In the next step the application should also send reply messages to the ReplyToQueue defined in the processed message.
The problem is: As the application will target the destination "ReplyToQmgr:ReplyToQueue", the QM will try to put the ReplyMessage to the XMITQ named after the ReplyToQmgr (Partners Queue Manager Name). But this XMITQ would have no connection to the Partner QM, but only the GWQM. Of course I could just route to the GWQM, but then I would have to make sure there's a Queue defined on the GWQM with the name of the ReplyToQueue so I would lose the dynamic.
Is there any way to solve this problem? (MQ Version is 9.0.1)
Thanks in advance!
David |
|
Back to top |
|
 |
Vitor |
Posted: Wed Apr 18, 2018 5:27 am Post subject: Re: How to send reply messages via Gateway Queue Manager? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
XinDHA wrote: |
Of course I could just route to the GWQM, but then I would have to make sure there's a Queue defined on the GWQM with the name of the ReplyToQueue so I would lose the dynamic. |
No you wouldn't
XinDHA wrote: |
Is there any way to solve this problem? (MQ Version is 9.0.1) |
Use queue manager alias techniques to route the message through the GWQM to the named ReplyToQMgr, where the resolution of the ReplyToQ name will be done automatically. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
XinDHA |
Posted: Wed Apr 18, 2018 6:31 am Post subject: Re: How to send reply messages via Gateway Queue Manager? |
|
|
Newbie
Joined: 18 Apr 2018 Posts: 8
|
Vitor wrote: |
XinDHA wrote: |
t;]Is there any way to solve this problem? (MQ Version is 9.0.1) |
Use queue manager alias techniques to route the message through the GWQM to the named ReplyToQMgr, where the resolution of the ReplyToQ name will be done automatically. |
Do the QM and GWQM need to be in a cluster for this or how do I get the routing from QM -> GQQM -> Partner done?
At the moment my problem is that the resolution of ReplyToQ is done on the GWQM already.
Last edited by XinDHA on Wed Apr 18, 2018 7:29 am; edited 2 times in total |
|
Back to top |
|
 |
exerk |
Posted: Wed Apr 18, 2018 6:39 am Post subject: Re: How to send reply messages via Gateway Queue Manager? |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
XinDHA wrote: |
At the moment my problem is that the resolution of ReplyToQ is done on the GWQM already. |
Can you expand on that please? Do you mean that you have a 'reference' to the ReplyToQ in the Gateway, e.g. a QREMOTE? _________________ 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 |
|
 |
Vitor |
Posted: Wed Apr 18, 2018 6:51 am Post subject: Re: How to send reply messages via Gateway Queue Manager? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
exerk wrote: |
XinDHA wrote: |
At the moment my problem is that the resolution of ReplyToQ is done on the GWQM already. |
Can you expand on that please? Do you mean that you have a 'reference' to the ReplyToQ in the Gateway, e.g. a QREMOTE? |
Also are you completely certain that the reply message is being addressed to the queue manager named in the ReplyToQMgr field and not being addressed to the GWQM?
Or to put the question another way, if there's no queue on the GWQM for the message to go to, no configuration except the channels linking the queue managers together and the queues for the inbound messages , what reason code do you get putting the reply message and which dead letter queue does it end up in? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Apr 18, 2018 6:57 am Post subject: Re: How to send reply messages via Gateway Queue Manager? |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
XinDHA wrote: |
I looked into the Knowledge Center for the QM Alias again and did some hands on and realised that I had a wrong understanding of some aspects, but now I got it done.
Thank you very much!  |
"I got it done" is not a good technical explanation of what you did to resolve this. For the benefit of all, please explain exactly what you did, and where you did it. _________________ 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 |
|
 |
XinDHA |
Posted: Wed Apr 18, 2018 7:35 am Post subject: |
|
|
Newbie
Joined: 18 Apr 2018 Posts: 8
|
I looked into the Knowledge Center for the QM Alias again and did some hands on and realised that I had a wrong understanding of some aspects, but now I got it done.
My problem was that in my Queue Manager Alias definition I put the XMITQ of my QM instead of the GWQM and for the RemoteQMgrName the GWQM instead of the PartnerQM.
Thank you very much!  |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Apr 18, 2018 8:25 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
XinDHA wrote: |
I looked into the Knowledge Center for the QM Alias again and did some hands on and realised that I had a wrong understanding of some aspects, but now I got it done.
My problem was that in my Queue Manager Alias definition I put the XMITQ of my QM instead of the GWQM and for the RemoteQMgrName the GWQM instead of the PartnerQM.
Thank you very much!  |
In future posts, and for the benefit of all, it would help if you copy/pasted the actual MQSC definition(s), and on which qmgr(s) you defined them.
Thank you for posting your solution. _________________ 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 |
|
 |
XinDHA |
Posted: Thu Apr 19, 2018 4:45 am Post subject: |
|
|
Newbie
Joined: 18 Apr 2018 Posts: 8
|
After my confusion yesterday due to trying things and changing configurations (and having gone through a long day) I checked everything again today and now I fully understand what I did wrong.
Basically the major problem was my understanding of the Queue Manager Alias concept. I didn't understand that I would need two Queue Manager Alias definitions (one on the GWQM and one on my internal QM) to fulfill my needs. All the time I acted on the assumption that I would have only one Queue Manager Alias (on my internal QM).
My two Queue Manager Aliases look like this:
On the internal QM:
Code: |
DEFINE QREMOTE(PARTNERQM) RNAME(' ') RQMNAME(MY_PARTNERQM_ALIAS) XMITQ(GATEWAYQM) |
And on the GWQM:
Code: |
DEFINE QREMOTE(MY_PARTNERQM_ALIAS) RNAME(' ') RQMNAME(PARTNERQM) XMITQ(PARTNERQM) |
Thanks everyone for opening my eyes!  |
|
Back to top |
|
 |
exerk |
Posted: Thu Apr 19, 2018 7:12 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Why not try, on the Internal QM:
Code: |
DEFINE QREMOTE(PARTNERQM) RNAME(' ') RQMNAME(PARTNERQM) XMITQ(GATEWAYQM) |
That way you don't need the queue manager alias in the Gateway QM  _________________ 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 |
|
 |
XinDHA |
Posted: Thu Apr 19, 2018 10:53 pm Post subject: |
|
|
Newbie
Joined: 18 Apr 2018 Posts: 8
|
exerk wrote: |
Why not try, on the Internal QM:
Code: |
DEFINE QREMOTE(PARTNERQM) RNAME(' ') RQMNAME(PARTNERQM) XMITQ(GATEWAYQM) |
That way you don't need the queue manager alias in the Gateway QM  |
You're right, for the scenario I described in here this is true, yes.
My actual scenario now is a bit more complex with the partner having multiple queue managers, so without Alias QMs on the Gateway I would need multiple XMITQs and therefore multiple channels (which I don't want), or am I missing something?
I actually have multiple Alias Queue Managers on the GWQM that look like:
Code: |
DEFINE QREMOTE(MY_PARTNERQM1_ALIAS) RNAME(' ') RQMNAME(PARTNERQM1) XMITQ(PARTNER.GWQM)
|
Code: |
DEFINE QREMOTE(MY_PARTNERQM2_ALIAS) RNAME(' ') RQMNAME(PARTNERQM2) XMITQ(PARTNER.GWQM)
|
But maybe there is a more elegant way to do this? |
|
Back to top |
|
 |
exerk |
Posted: Fri Apr 20, 2018 12:04 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
OK, thank you. Apologies, I missed the fact that you were catering for multiple partner queue managers being served by a partner gateway.
In your gateway queue manager:
Code: |
DEFINE QREMOTE(PARTNERQM1) RNAME(' ') RQMNAME(PARTNERQM1) XMITQ(PARTNER.GWQM) |
And:
Code: |
DEFINE QREMOTE(MY_PARTNERQM1_ALIAS) RNAME(' ') RQMNAME(PARTNERQM1) XMITQ(PARTNER.GWQM) |
Are functionally the same. If you're using MY_PARTNERQM1_ALIAS to positively identify a 'foreign' queue manager, that's not a bad idea. _________________ 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 |
|
 |
|