Author |
Message
|
abiram8 |
Posted: Thu Dec 11, 2003 6:24 am Post subject: MQ Failover Using Clustering or ??? |
|
|
 Master
Joined: 27 Mar 2002 Posts: 207 Location: India
|
Hi,
I have two Full Repository Queue Manager(QM1 and QM2)
in a cluster named Inventory.
I have java MQ Client connecting to QM1 Always and put into queue q1 (of QM1)
Then I have Local Queue q1 also for QM2.
My requirment is if QM1 fails the Java MQ Client should put message automatically to QM2.q1
Since both q1 (in QM1 and QM2 has exact same defination).
But it never happened.
To my knowledge MQCluster may not provide the Fail over Capabilities
Is there any other way to achive this Fail over eq..
1)Writing the Exit prog for Failover.
2) Any other simple solutions which can quickly get the fail over tasks.
Thanks and Regards,
Abiram
 |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Dec 11, 2003 6:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Okay, two options. First option, set up a third QM that is in the cluster, but does not have a copy of the queue you are putting to. Then connect your Java client to that QM. As long as that QM3 is running, your app will put to either QM1 or QM2 without knowing or caring which is up. (in fact, they will be workload balanced).
Second option, rewrite your app to detect when the connection to QM1 goes down, and have it try to create a connection to QM2.
MQSeries Clustering does not provide failover. Hardware clustering does. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
offshore |
Posted: Fri Dec 12, 2003 7:47 am Post subject: |
|
|
 Master
Joined: 20 Jun 2002 Posts: 222
|
We are using MQ Clustering to provide failover capabilities. There is hardware involved too, so perhaps I don't know where to draw the line??
Here is my setup.
We have a z/900 mainframe with 2 LPARS. MQ1 running on LPAR1 and MQ2 running on LPAR2.
Then we have a Windows server with MQ3 running.
All MQ's are in a cluster, with MQ1 & MQ2 as full repositories.
MQ1 and MQ2 have all the application queues defined as local cluster queues.
(IMPORTANT - MQ1 and MQ2 must be identical, ie: if you create Q1 on MQ1, you'll have to make the same def in MQ2.)
MQ3 has cluster channels defined to both MQ1 & MQ2. If MQ01 goes down, it can send to MQ02 and continue processing. MQ01 will finish all outstanding work before going down.
Also, we use the MC76 support pac exit to have a primary MQ (using the NETPRTY on the cluster receiver channel) that all message will go to if its up, other wise the it does a round robin deal.
Most of my information came from the WebSphere Clustering book in CH 7.
It explains what I tried here, probably in better detail.
HTH (or muddies the water even more) |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Dec 12, 2003 10:11 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
offshore wrote: |
Also, we use the MC76 support pac exit to have a primary MQ (using the NETPRTY on the cluster receiver channel) that all message will go to if its up, other wise the it does a round robin deal. |
This is what makes your setup act as a failover environment. Out of the Box, clusters only provide workload balancing (round robin). There's no notion of "primary" or "secondary" queue managers - everyone is an equal partner - it's very democratic.
Well, that and you might also be running queue sharing on your OS/390.
Also, in your setup, if you have clients connecting to MQ01, they don't get automatically "switched" to MQ02 when MQ01 goes down, right? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
offshore |
Posted: Fri Dec 12, 2003 11:19 am Post subject: |
|
|
 Master
Joined: 20 Jun 2002 Posts: 222
|
True the MC76 gives the notion of primary and secondary. I was thinking even the round robin will work if MQ1 goes down, all the work will go to MQ2. (I have to test that out again...I did a while ago when setting up, but I forget now!)
We had considered using Queue Sharing Groups, but due to the 64K message limit, and the amount of setup required to use QSG.
As far as the client, we don't have any clients connection directly to the mainframe so it is a different situation.
I guess though it is possible to use MQ Clustering as a failover mechanism???? Although not "out-of-the-box" persay. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Dec 12, 2003 12:36 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Clustering does provide a sort of failover. As you say, if a queue manager goes down, all new work goes to the other qms that have a copy of the cluster queues that were on that qm or sit in the cluster transmit queue if there are none.
But, without queue-sharing or hardware clustering, the work that is already on the qm that has gone down is unavailable. So if there are ten messages on MQ01 and MQ01 goes down, they are not available until MQ01 comes back up.
In addition, all clients connected to MQ01 when it goes down have to reestablish connections to another queue manager or wait until MQ01 is back up. Hardware clustering avoids this, as the secondary copy of MQ01 comes back up with the same machine and etc. Connections will have to be re-established, but they won't have to be made to a different queue manager at a different hostname/port combination. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mrlinux |
Posted: Fri Dec 12, 2003 8:18 pm Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Why not use queue sharing groups on Mainframe ??? _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
abiram8 |
Posted: Mon Dec 15, 2003 6:20 am Post subject: |
|
|
 Master
Joined: 27 Mar 2002 Posts: 207 Location: India
|
Hi,
Thanks for the Guidence.
The Failover term in MQ Series is slightly misleading
Here they mean Failover of a Queue not QueueManager.
ie., If one QM in Cluster donot have the Queue its put into another QM.Queue
But I beleived that If one QM in a cluster is down another will take over
when a Client is trying to connect to it
Hope I have understood correctly ???
Abiram
 |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Dec 15, 2003 6:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
abiram8 wrote: |
But I beleived that If one QM in a cluster is down another will take over
when a Client is trying to connect to it
Hope I have understood correctly ???
Abiram
 |
No. This doesn't happen by default, not with MQSeries clustering. It does with hardware clustering. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
EddieA |
Posted: Mon Dec 15, 2003 9:57 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
But I beleived that If one QM in a cluster is down another will take over when a Client is trying to connect to it
|
If you really do mean an MQ Client, then this can be achieved by using the Client Connection table.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Dec 15, 2003 10:26 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
EddieA wrote: |
Quote: |
But I beleived that If one QM in a cluster is down another will take over when a Client is trying to connect to it
|
If you really do mean an MQ Client, then this can be achieved by using the Client Connection table.
Cheers, |
Provided it's not a Java client. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sanvaranasi |
Posted: Tue Feb 24, 2004 7:41 am Post subject: But, without queue-sharing or hardware clustering..... |
|
|
 Novice
Joined: 24 Feb 2004 Posts: 10 Location: india
|
I am referring to jefflowrey's comments . But this is a general doubt any feedback from anyone is welcome. What i understand is that If there are messages on a queue under MQ01 and MQ01 goes down then those messages will be made available to MQ2 if the queue is shared. Does this mean that if MQ01 has a queue called Q1 and make this a cluster queue that is shareable then if MQ01 goes downi can still get the messages as Q1 is a cluster queue and thus visible to node MQ2. Is get from cluster queue really possible from MQ2 eventhoug it was not created from MQ2 ?
My requirement is that if MQ01 goes down i should be able to access messages lying on local queues / cluster queue created on MQ01 from MQ2. How can we achieve this ? |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Feb 24, 2004 7:49 am Post subject: Re: But, without queue-sharing or hardware clustering..... |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
contact admin wrote: |
My requirement is that if MQ01 goes down i should be able to access messages lying on local queues / cluster queue created on MQ01 from MQ2. How can we achieve this ? |
With hardware clustering. NOT MQSeries clustering. The Fine Manuals will tell you everything you need to know about this, if you take the time to Read Them. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|