ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » How to send reply messages via Gateway Queue Manager?

Post new topic  Reply to topic
 How to send reply messages via Gateway Queue Manager? « View previous topic :: View next topic » 
Author Message
XinDHA
PostPosted: Wed Apr 18, 2018 5:17 am    Post subject: How to send reply messages via Gateway Queue Manager? Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed Apr 18, 2018 5:27 am    Post subject: Re: How to send reply messages via Gateway Queue Manager? Reply with quote

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
View user's profile Send private message
XinDHA
PostPosted: Wed Apr 18, 2018 6:31 am    Post subject: Re: How to send reply messages via Gateway Queue Manager? Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Wed Apr 18, 2018 6:39 am    Post subject: Re: How to send reply messages via Gateway Queue Manager? Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed Apr 18, 2018 6:51 am    Post subject: Re: How to send reply messages via Gateway Queue Manager? Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Wed Apr 18, 2018 6:57 am    Post subject: Re: How to send reply messages via Gateway Queue Manager? Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
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
View user's profile Send private message
XinDHA
PostPosted: Wed Apr 18, 2018 7:35 am    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Wed Apr 18, 2018 8:25 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
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
View user's profile Send private message
XinDHA
PostPosted: Thu Apr 19, 2018 4:45 am    Post subject: Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Thu Apr 19, 2018 7:12 am    Post subject: Reply with quote

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
View user's profile Send private message
XinDHA
PostPosted: Thu Apr 19, 2018 10:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Fri Apr 20, 2018 12:04 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » How to send reply messages via Gateway Queue Manager?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.