Author |
Message
|
akp101 |
Posted: Thu Jul 19, 2018 1:07 am Post subject: Route a message using MQMD.ReplytoQMGR in a same cluster |
|
|
Newbie
Joined: 18 Jul 2018 Posts: 2
|
Current Setup:
- We have 3 queue managers in a cluster- Gateway(GWQMGR), base queue managers(QMGR1 and QMGR2).
- Gateway(GWQMGR) have alias queue(XYZ.Q.ALIAS) which is pointing to base queue(XYZ.Q) present on both the QMGR1 and QMGR2.
- If I put message on Gateway(GWQMGR)queue(XYZ.Q.ALIAS), then it is been routed to any of queue managers(i.e. QMGR1 or QMGR2) randomly.
To-be Setup:
- Requirement is to route the message on specific base queue manager(either QMGR1 or QMGR2).
- If I set MQMD.ReplyToQMGR = QMGR1, then message should go to QMGR1 only.
How could I solve above problem?
Will it be feasible/possible to write workload balancing exits on incoming MQMD.ReplyToQMGR?
Also suggest if there is any alternative.
Thanks in advance!!!! |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jul 19, 2018 4:12 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
That is not the purpose of the MQMD Reply TO Queue Manager field when sending mesages. Its there to tell the receiver where to send replies to, not for the sender as a means to address the request.
Quote: |
Requirement is to route the message on specific base queue manager(either QMGR1 or QMGR2 |
On your MQOPEN call, populate the Destination Queue Manager Name in the MQOD with the name of the queue manager you want send to. Or leave it blank if you want load balancing to occur if the destination queue is clustered. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
gbaddeley |
Posted: Sun Jul 22, 2018 3:56 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Quote: |
Requirement is to route the message on specific base queue manager(either QMGR1 or QMGR2) |
Why do you need to do that? It negates some benefits of MQ Clusters, such as automatic load balancing & handling qmgr failure. The base qmgrs should provide identical services for the queue, and it shouldn't matter which one messages go to. _________________ Glenn |
|
Back to top |
|
 |
akp101 |
Posted: Wed Aug 29, 2018 12:04 am Post subject: |
|
|
Newbie
Joined: 18 Jul 2018 Posts: 2
|
gbaddeley wrote: |
Quote: |
Requirement is to route the message on specific base queue manager(either QMGR1 or QMGR2) |
Why do you need to do that? It negates some benefits of MQ Clusters, such as automatic load balancing & handling qmgr failure. The base qmgrs should provide identical services for the queue, and it shouldn't matter which one messages go to. |
Because in base qmgr, MQGET node is waiting for response. It will create issue if message gets routed to another base qmgr. |
|
Back to top |
|
 |
exerk |
Posted: Wed Aug 29, 2018 12:50 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
The essence of clustering is to remove any affinities - as has been stated by gbaddeley, any application instance should be able to service any 'reply'.
If you really, really need to have a message go back to a particular application instance, then have a differently named reply-to-queue in each base queue manager - but I really, really recommend you do NOT do this. _________________ 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 |
|
 |
hughson |
Posted: Wed Aug 29, 2018 2:42 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
PeterPotkay wrote: |
Quote: |
Requirement is to route the message on specific base queue manager(either QMGR1 or QMGR2 |
On your MQOPEN call, populate the Destination Queue Manager Name in the MQOD with the name of the queue manager you want send to. Or leave it blank if you want load balancing to occur if the destination queue is clustered. |
 _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
|