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 » Clustering » Force message to a specific queue manager in cluster

Post new topic  Reply to topic
 Force message to a specific queue manager in cluster « View previous topic :: View next topic » 
Author Message
rajesh_avrs
PostPosted: Thu Jul 29, 2004 11:01 pm    Post subject: Force message to a specific queue manager in cluster Reply with quote

Apprentice

Joined: 18 May 2001
Posts: 31

Hi,

I have two 2000 servers hosting Queue managers QM1 and QM2. I have an OS/390 box hosting another queue manager, QM3. All the three queue managers are part of a cluster.

QM1 and QM2 are hosting a queue called RESPONSE. QM3 is hosting a queue called ASKME and is shared in cluster too.

Now I have some clients who either connect to QM1 or QM2. They post a request message to ASKME and wait for response on RESPONSE queue on the same queue manager. Some program in QM3 is reading the messages posted in ASKME and put a response in RESPONSE.

The OS/390 program is using MQPUT1 to put a response into the RESPONSE queue. Now because of the default cluster load balancing, the response can go to either QM1 RESPONSE queue or QM2 RESPONSE queue. In this setup, only 50% of the times, the client would get a response back.

We thought we will over come the problem by setting the "Object Queue Manager" field in the MQObject Descripter to the reply to queue manager specified in the request message.

To my surprise, even after setting the MQOD Object Queue Manager, the response message is still not forced to go to the queue manager where the request was originated... I am using all the default BIND options... and using all the default parameters applicable to clustering...

Is there any place I need to look for this problem? I need the RESPONSE back to the same queue manager queue where the client is connected.... and the clients have a choice of connecting to whatever the queue manager they like, either QM1 or QM2....

Any responses will be highly appreciated...

Thanks,
Rajesh
_________________
****************
MQSeries is cool
****************
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Fri Jul 30, 2004 5:27 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Have you tried with a dynamic response queue created by the application doing the put?
The ideal would be for the application to declare the dynamic queue once,
use it as long as needed. Just make sure it gets removed / deleted when the application shuts down / switches qmgr

Hope this helps some.
Back to top
View user's profile Send private message Send e-mail
rajeshavrs
PostPosted: Fri Jul 30, 2004 8:21 am    Post subject: Reply with quote

Novice

Joined: 15 Jun 2004
Posts: 10

That's a great idea, which I would surely implement in my next assignment...

Unfortunately, the setup I mentioned is already in place in Production and we are looking for a fix at a configuration level, if any....

Any more ideas?
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
PeterPotkay
PostPosted: Fri Jul 30, 2004 1:42 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Quote:

We thought we will over come the problem by setting the "Object Queue Manager" field in the MQObject Descripter to the reply to queue manager specified in the request message.


This is the one and only way of doing it. If its not working, either there is a bug in the IBM MQ code (doubt it, since we do what you are trying to do all the time) or your code is not coded the way you think it is. (Post the code?)

The only other possability is that you have QMAliases for QM1 and QM2 on QM3 that blank out the Destination QM of the reply message, causing round robining to kick in despite what the program put out.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
rajeshavrs
PostPosted: Fri Jul 30, 2004 1:52 pm    Post subject: Reply with quote

Novice

Joined: 15 Jun 2004
Posts: 10

Where can I get the sample COBOL code that actually rips off the "Reply To Queue" from request message and sets it in the "MQOD Object Queue Manager name"?

Thank you.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
PeterPotkay
PostPosted: Fri Jul 30, 2004 2:01 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Do your MQGET
Code:

MOVE MQMD-REPLYTOQMGR TO W01-HOLD-THE-NAME

.
.
Work on the request
.
.
Get ready for the MQPUT1
Code:

MOVEW01-HOLD-THE-NAME TO MQOD-OBJECTQMGRNAME


Do the MQPUT1


???
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
rajeshavrs
PostPosted: Fri Jul 30, 2004 2:45 pm    Post subject: Reply with quote

Novice

Joined: 15 Jun 2004
Posts: 10

I might be being paranoid... but, does the above piece of code always works as intended, irrespective of the cluster bind options?

I mean, whether bind option is "Bind on Open" or "Not Fixed"... will the above piece of code always instructs MQ to route the message to the queue manager specified in MQOD Object Queue Manager?

1) What happens if I specify QM4 (some junk value) in this field?
2) What happens if I specify QM1 and before the MQPUT1 happens QM1 goes down?

Any special scenarios I need to consider for my testing?
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
PeterPotkay
PostPosted: Fri Jul 30, 2004 4:34 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Quote:

does the above piece of code always works as intended, irrespective of the cluster bind options?

Yes. Doesn't matter in your case anyway, since you are using the MQPUT1 call. See this quote from the manual:
Code:

The MQPUT1 call always operates as though MQOO_BIND_NOT_FIXED were in effect, that is, it always invokes the workload management routine.



Quote:

1) What happens if I specify QM4 (some junk value) in this field?

DLQ or your MQPUT call fails, can't remember exactly which one. I think the MQPUT will fail.

Quote:

2) What happens if I specify QM1 and before the MQPUT1 happens QM1 goes down?

The message will wait in the S.C.T.Q until it comes back up.

Quote:

Any special scenarios I need to consider for my testing?

I think you have covered all of them in this regard.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
luckykao
PostPosted: Sun Sep 12, 2004 5:58 pm    Post subject: Reply with quote

Newbie

Joined: 12 Sep 2004
Posts: 1

Where can I get the sample Java code?
It seems to be no mqod in Java Architecture.
Like mqmd destributes into the message parameters?

And if i force the message to a specific queue manager in a cluster
, then QM1 or QM2 fail, will the message be sent to the other one for
high availability?

Thanks for your responses!
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon Sep 13, 2004 5:03 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Quote:

Where can I get the sample Java code?
It seems to be no mqod in Java Architecture.
Like mqmd destributes into the message parameters?


Read the MQ Jave Manual (Documentation Button at the top of this screen)

Quote:

And if i force the message to a specific queue manager in a cluster
, then QM1 or QM2 fail, will the message be sent to the other one for
high availability?


No. If you said to go to QM1, it will only go to QM1, or will keep trying till QM1 is available. The behaviour you want can only be accomplished by a custom Cluster Workload exit that you write yourself.

Also, read this post:
http://www.mqseries.net/phpBB2/viewtopic.php?t=17012&highlight=exit
_________________
Peter Potkay
Keep Calm and MQ On
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 » Clustering » Force message to a specific queue manager in cluster
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.