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 » IBM MQ Java / JMS » Put to a cluster and get from local?

Post new topic  Reply to topic
 Put to a cluster and get from local? « View previous topic :: View next topic » 
Author Message
JonnyCat26
PostPosted: Thu Feb 05, 2004 10:39 am    Post subject: Put to a cluster and get from local? Reply with quote

Newbie

Joined: 02 Feb 2004
Posts: 5

Hi,

Yet another newbie MQ Question I'm afraid...

If I send a message to a cluster queue, it could end up on any of the other machines in the queue due to load balancing. So I can't be assured that it will always be returned to the same machine's local queue.

So would the best solution be to create a class which spawns a few threads to go out and hit all the local queues in the cluster to watch for my reply, and then terminate them when my reply comes in? Or is there a way to find out which machine will have the reply?

Thanks!

Jon
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Feb 05, 2004 11:06 am    Post subject: Re: Put to a cluster and get from local? Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

JonnyCat26 wrote:
If I send a message to a cluster queue, it could end up on any of the other machines in the queue due to load balancing.

No. Not if there is a local copy of the queue.

JonnyCat26 wrote:
Or is there a way to find out which machine will have the reply?

Yes. Populate the ReplyToQMgr field of your MQMD. The server application should respect that, and push it back to the queue manager you want it to go to.

JonnyCat26 wrote:
So would the best solution be to create a class which spawns a few threads to go out and hit all the local queues in the cluster to watch for my reply

That would be a less than ideal solution.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
techno
PostPosted: Thu Feb 05, 2004 12:16 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

Don't you want to run the receiver application all the time?

I guess u have qmgrs on different machines. So, run the receiver applications on all the machines. Whenever they see a message in their local-q, that message gets processed. If this is the way, you may not need threading app.

Jeff, what do you say?
Back to top
View user's profile Send private message
JonnyCat26
PostPosted: Thu Feb 05, 2004 12:22 pm    Post subject: Reply with quote

Newbie

Joined: 02 Feb 2004
Posts: 5

Well, there is a receiver application running all the time to process messages and post responses. I'm coming at it from the client side, just need to post a message (and it has to go to the clustered queue manager) and get my response.

So far it seems like the replytoQMgr may be the way to do that. At least I can force it to a known location.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Feb 05, 2004 1:26 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Typically, one will either use the ReplyTOQueueManager field to force the reply to come back to the right place, or one will use a queue that only has one instance that's shared in the cluster.

That is, if you set up a queue MY.CLIENT.REPLY.QUEUE only on one queue manager, and shared it in the cluster, you would know that the reply messages could only go to one queue, no matter what queue manager serviced the request.

You could also set up QMGRNAME.CLIENT.REPLY.QUEUE, if you wanted clients running connected to different QMs in the cluster.

Or, dynamic queues might be shareable in the cluster. I forget.
_________________
I am *not* the model of the modern major general.
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 » IBM MQ Java / JMS » Put to a cluster and get from local?
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.