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 » Clients and Clustering - Just to confirm...

Post new topic  Reply to topic
 Clients and Clustering - Just to confirm... « View previous topic :: View next topic » 
Author Message
mcmags34
PostPosted: Wed Jul 17, 2002 12:50 pm    Post subject: Clients and Clustering - Just to confirm... Reply with quote

Novice

Joined: 02 May 2002
Posts: 14
Location: Philadelphia, PA

I read through most of the messages on this Clustering board, and want to confirm that I have the correct understanding of what to expect from an MQSeries Client perspective. Assume we're dealing with two QMs in the cluster:

QM1 = AIX, Location A
QM2 = Win2k, Location B

Please comment on any incorrect statements.

1. A Client uses an AMQCLCHL.TAB file with entries for QM1 and QM2. It wants to issue an MQCONN or MQCONNX call to QM1. If QM1 is not available, it is up to the Client to retry the MQCONN and specify QM2 as the server name instead of QM1. The "connection failover" from QM1 to QM2 will not happen automatically. This is true regardless of whether or not QM1 and QM2 are clustered.

2. A Client has made a successful connection to QM1 and has been putting and getting messages with no problems. QM1 is accidentally unplugged. The next MQPUT or MQGET to the queue in question will happen on QM2.

Thanks for enlightening me, previously and in the future!

Chris Maguire
Back to top
View user's profile Send private message Send e-mail AIM Address
nimconsult
PostPosted: Wed Jul 17, 2002 9:38 pm    Post subject: Reply with quote

Master

Joined: 22 May 2002
Posts: 268
Location: NIMCONSULT - Belgium

MQ Client is just a client/server communication tool to a MQ Server. The answers to your questions are:

1. No there is no connection failover
2. No if QM1 goes down the connection is broken and the client will fail in subsequent MQGET or MQPUT. The client will not by magic attempt to reconnect to MQ2
_________________
Nicolas Maréchal
Senior Architect - Partner

NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mrlinux
PostPosted: Mon Jul 22, 2002 4:31 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

If you define your CHANNEL Table MQSeries will automaticaly try the next
queue manager during the MQCONN only. You need to name the channel the same on each system.
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
vmcgloin
PostPosted: Mon Jul 22, 2002 5:16 am    Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

Hi,

I have just been asked similar question to the above, but my MQ knowledge does not (yet) extend to clients. I have a had a quick read of the manual and I think I understand what you are saying above, but I have a few questions...

- Is there any way for a client to connect to a server in a round-robin fashion - for load balancing on server?
- How could I tell different client applications on the one machine to access different servers? (For example different test environments, or one server for updates, one for inquiries.) Is there any way other than changing the MQSERVER env variable?

How does the statement "If you define your CHANNEL Table MQSeries will automaticaly try the next
queue manager during the MQCONN only. You need to name the channel the same on each system." tie up with "there is no connection failover ". Am I missing the point?

We will be using NT clients and AIX servers.
Thanks for your help!
Vicky
Back to top
View user's profile Send private message
mcmags34
PostPosted: Mon Jul 22, 2002 6:25 am    Post subject: Reply with quote

Novice

Joined: 02 May 2002
Posts: 14
Location: Philadelphia, PA

An alternative to the MQSERVER environment variable is two use two other variables - MQCHLTAB and MQCHLLIB - together to declare a "Channel Table", which specifies possible Channel and Connection (server) names to be made from the MQSeries Client. See the MQSeries Client manual for more details on how to set these up. Personally, I found this to be much more reliable than MQSERVER, even if you're only defining a single connection channel.

From what I gather from mrlinux's reply, you could define two connections - one to each of your two servers - that features the same Server Connection Channel name. During an MQCONN call, if the channel connection to the first server fails, MQSeries will attempt to connect to the second server.

Vicky, this concept can be applied in the scenario where multiple applications want to connect to multiple Queue Managers from the same MQSeries client machine. For example, I have an AMQCLCHL.TAB file (the aforementioned "Channel Table") that specifies these connections. Then, from my applications, I just specify which Queue Manager to which I'd like to make my connection. It seems to work just fine.

My follow up question: The two Queue Managers in question have different names (as one might expect). That implies that you'd have to leave the Queue Manager name blank in the MQCONN or MQCONNX call to achieve the "connection failover" goal, correct?

Thanks!
Back to top
View user's profile Send private message Send e-mail AIM Address
vmcgloin
PostPosted: Mon Jul 22, 2002 6:41 am    Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

Suddenly it all becomes clear. Thanks!
Back to top
View user's profile Send private message
vmcgloin
PostPosted: Tue Jul 23, 2002 1:34 am    Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

One more related question...

If I understand correctly the AMQCLCHL.TAB file is created on the server and copied to the client.

Is this valid if the client is on NT and the server on AIX?
Or, do we need to use an NT qmgr to create the CLNTCONN definitions?

I would try it but don't have access to a client machine at the moment.

Thanks again,
Vicky
Back to top
View user's profile Send private message
mrlinux
PostPosted: Tue Jul 23, 2002 3:12 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

Thr channel table file is interchangeable from platform to platform,
I have trierd HPUX to NT with no problems.
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
PeterPotkay
PostPosted: Tue Jul 23, 2002 8:02 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

Chris,
If QM1 and QM2 are the default QMs on their respective boxes, than you can have your app specify a blank queue manager name on the MQCONN call. It will go to the channel table and start searching it by channel name for the QM you asked for in the MQCONN call. In this case, if you created the channel table with 2 channels (CLIENT.QM1 and CLIENT.QM2, both with no QM name specified), your app would try and connect to QM1 first, and if QM1 is N/A, it would automatically try QM2.

Actually, you can specify the name"*QM1" or "*QM2" or "*jrfbrbrrj" on your MQCONN call. This means ignore the target QM name and go thru the channel table by channel name trying each entry until you get a connection.

This does not mean that if you do make a connection which later fails that somehow you will automatically get connected to the other QM. You will have to code logic that says if at anytime you get a RC that says you are disconnected, do the MQCONN call again, where the auto retry will happen.

What if you want QM2 to be the primary? Make the channel names such that the one to QM2 comes first alphabetically. ACLIENT.QM2 and BCLIENT.QM1
_________________
Peter Potkay
Keep Calm and MQ On


Last edited by PeterPotkay on Thu Jul 25, 2002 5:13 am; edited 1 time in total
Back to top
View user's profile Send private message
jc_squire
PostPosted: Wed Jul 24, 2002 2:25 pm    Post subject: Reply with quote

Centurion

Joined: 14 Apr 2002
Posts: 105
Location: New Zealand

Another alternative - but this depends on $$$ and equipment available and how many clients are going to connect ........

As per Peter's previous post - leave the qmgr name blank on the MQCONN call but instead only specify a single chl with a single IP address. Define the same SVRCONN chl on both QM1 and QM2 and install a router in between with Load Balancing/Fail Over/Network Address translation functionality.

We have implemented this previously with 1200 client connections distributed over 4 qmgrs (in a cluster of 6) on a least number of connections basis.

Obviously the option you use should be inline with your requirements/environment.

Regards
Back to top
View user's profile Send private message
mrlinux
PostPosted: Thu Jul 25, 2002 3:42 am    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

To make the MQCONN call work with Channel Table you need to name
the queue managers with similar names QM1, QM2 and then in the call
specify qmgr as "QM*".
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
rajesh_avrs
PostPosted: Fri Jan 28, 2005 4:04 pm    Post subject: Reply with quote

Apprentice

Joined: 18 May 2001
Posts: 31

Mrlinux, that is not true. I just tried with this QM1, QM2 & QM* setup, but the MQCONN failed with 2058.
_________________
****************
MQSeries is cool
****************
Back to top
View user's profile Send private message Send e-mail
mrlinux
PostPosted: Fri Jan 28, 2005 8:26 pm    Post subject: Reply with quote

Grand Master

Joined: 14 Feb 2002
Posts: 1261
Location: Detroit,MI USA

Well post me your channel table and your code, I have had it in production for more than 2yrs and have watched in the logs as it fails from qmgr 1/2/3
_________________
Jeff

IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Clustering » Clients and Clustering - Just to confirm...
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.