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 » Connecting to cluster

Post new topic  Reply to topic
 Connecting to cluster « View previous topic :: View next topic » 
Author Message
JonnyCat26
PostPosted: Mon Feb 02, 2004 11:43 am    Post subject: Connecting to cluster Reply with quote

Newbie

Joined: 02 Feb 2004
Posts: 5

Hi,

I'm trying to connect to an MQ cluster using the java classes, and can't quite figure out how to do it. I know I can connect to a specified host, but how can I point it to a list of hosts (making up the closter)?

I know the windows guys can do that with the COM+ object, any way to do something similar with the java classes?

-jon
Back to top
View user's profile Send private message
mqonnet
PostPosted: Mon Feb 02, 2004 11:59 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

You do not have to connect to each queue manager and that is the whole point of clustering. So, i am not sure what you want to achieve and what your question is. Post your scenario and exact question.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
JonnyCat26
PostPosted: Mon Feb 02, 2004 12:01 pm    Post subject: Failover Reply with quote

Newbie

Joined: 02 Feb 2004
Posts: 5

I want to specify multiple machines for load balancing and failover purposes. I know I can manually handle failover, open a first connection, then a second... but I'm a bit fuzzy on how the load balancing bit works. Supposedly it just "knows" with the COM+ stuff.
Back to top
View user's profile Send private message
mqonnet
PostPosted: Mon Feb 02, 2004 1:08 pm    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Well, i am still not 100% clear as to what you want to achieve but what i understood is that you want your app to handle failover situation by connecting to multiple machines simultaneously. If that is so, then here are some additional questions.

1) What is that you would achieve with this.
2) What would your app do in a failover situation.
3) How would your app know that there was a failure.


Now since MQ has inbuilt Clustering feature and does the load balancing, i am not sure why you want to replicate it with your app(which again i havent understood clearly).

As for connecting to multiple machines/queue managers simultaneously is concerned you have to use Threading for that and there are tons of limitations associated with it. Look in the manuals for more help on this topic.

Again what is the "Com+" stuff you are referring to. Are you referring to the actual transport layer or are you referring to the Com objects. In either case, why do you need to go into those details at all.

Explain in detail your complete scenario.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
JonnyCat26
PostPosted: Mon Feb 02, 2004 1:11 pm    Post subject: Reply with quote

Newbie

Joined: 02 Feb 2004
Posts: 5

Basically, we have 2 machines runnign a clustered queue. One is on .79, one is on .80.

IF one isn't available, I'd like to connect to the other. I know I can do this manually. I'm more concerned about the load balancing aspects of this. How do I know which is less stressed, and thus, the ideal one to connect to?
Back to top
View user's profile Send private message
mqonnet
PostPosted: Mon Feb 02, 2004 1:18 pm    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Still havent' answered questions from my previous post. :). But here are your answers.

Basically, we have 2 machines runnign a clustered queue. One is on .79, one is on .80.
---Now i would assume you are talking about 2 queue managers that are full repository with listeners on ports 79 and 80??? Please be more specific as to what you mean.

IF one isn't available, I'd like to connect to the other. I know I can do this manually.
---Well, your app needs to know if a queue manager is running or not. Load balancing is a feature "within" MQ and not within applications deveoped on top of MQ. So, in your case, if your app is trying to connect to a qm that is down, you would get a bad rc stating the reason. You then need to either end your app or try and connect to the other qm. This is purely a design issue. Nothing really to do with MQ clustering.


I'm more concerned about the load balancing aspects of this.
---As mentioned above, Load balancing is an mq issue not your application issue.


How do I know which is less stressed, and thus, the ideal one to connect to?
---This is again a desing issue. MQ cannot tell you if one qm is stressed than the other. You have to run, may be 3rd party tools to monitor etc, gather data and then deduce if one qm is stressed than the other. Again design issue.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jefflowrey
PostPosted: Mon Feb 02, 2004 3:40 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I'm pretty sure that he's talking about the fact that the COM+ interface, and the C/C++ interface support the use of the client connection tables.

And I'm pretty sure that the Java interface doesn't. But I don't remember off the top of my head.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon Feb 02, 2004 4:12 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

We're getting into the "apples and oranges" scenario here now.

The 'client connection table' is used to determine which Queue Manager a client connects to. It is ALWAYS searched sequentially trying to find a match, for an active Queue Manager, based on what was supplied by the Client. This can give you a 'kind of' failover coverage. If Queue Manager A isn't available, try Queue Manager B. Nowhere does it do load balancing. Also, it has NOTHING to do with Clustering. And as Jeff poited out, it is NOT avaialable for Java.

Now, once you have connected to your Queue Manager, Clustering 'might' come into the picture. Clustering gives you the ability to PUT a message to any Queue Manager, in the Cluster, that hosts the Queue. Unless the Queue is local to the machine you have connected to, in which case it is ALWAYS PUT locally. If the Clustered Queue is not local, and it is hosted on more that one other Queue Manager, then MQ will 'round robin' the requests between the Queues on the other Queue Managers. (Provided that the OPEN options are correct).

Now, with this explanation in mind, do you still have any questions. If so, then please do as Kumar has asked, and "Explain in detail your complete scenario".

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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 » Connecting to 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.