Author |
Message
|
kirankinnu |
Posted: Fri Mar 05, 2010 11:52 am Post subject: Design Question |
|
|
 Centurion
Joined: 12 Jun 2004 Posts: 128 Location: Chicago, IL
|
Hello Folks,
We are having an interesting design question that we are facing.
Here is the scenario,
We have 2 Brokers(Broker1 & Broker2) in a MQ cluster. We have a scheduler flow deployed on both the brokers. The job of Scheduler flow is to read a DB when the flow starts, and send Timeout Control notifications. We have about 100 scheduler events that will be generated by this.
Since the flow is deployed in both the brokers, at any point in time only 1 should be running. If both are running, there will be duplicate scheduler events. How can we make sure that only one flow is running. Either the Scheduler flow on Broker1 or the Scheduler flow on Broker2. And also we need to implement fail-over where If 1 flow is stopped for maintenance, the other flow should start.
Do we need an external monitor to monitor the flows or can we have some logic inside the flow to handle this..
The brokers are on windows and on version 6.1
Any ideas would be appreciated.
Thank you,
Kiran |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 05, 2010 11:57 am Post subject: Re: Design Question |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kirankinnu wrote: |
How can we make sure that only one flow is running. Either the Scheduler flow on Broker1 or the Scheduler flow on Broker2. And also we need to implement fail-over where If 1 flow is stopped for maintenance, the other flow should start. |
It has been said many, many times on this forum that a WMQ Cluster is an unsuitible method of providing failover.
kirankinnu wrote: |
Do we need an external monitor to monitor the flows or can we have some logic inside the flow to handle this.. |
You need some external monitor. You'll tie yourself in knots trying to work out from Broker 2 if Broker 1 is running or not. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kirankinnu |
Posted: Fri Mar 05, 2010 12:12 pm Post subject: |
|
|
 Centurion
Joined: 12 Jun 2004 Posts: 128 Location: Chicago, IL
|
Thanks Vitor for quick reply..
We are using WMQ Cluster for load balancing and not for fail over..
I was wonder if there is anyway we could design using DB or using Queues.
We do not want to develop monitor for message flow failover. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 05, 2010 12:17 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kirankinnu wrote: |
We are using WMQ Cluster for load balancing and not for fail over.. |
Ok, my bad. So if load is balanced across the cluster why are you worried about duplicates?
kirankinnu wrote: |
We do not want to develop monitor for message flow failover. |
I don't see how you're going to avoid it. Others might. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kirankinnu |
Posted: Fri Mar 05, 2010 12:29 pm Post subject: |
|
|
 Centurion
Joined: 12 Jun 2004 Posts: 128 Location: Chicago, IL
|
Well the Scheduler flow is designed in such a way that, when the flow starts, it will read DB entrees and generate Scheduler events. If both the flows are running, both will try to read same DB entrees and will generate duplicate Scheduler entrees. We want to avoid this. Thats the reason we only want 1 flow to be running always..
Looks like we would have to go with Monitor |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 05, 2010 12:39 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kirankinnu wrote: |
Looks like we would have to go with Monitor |
I'd say so.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Mar 05, 2010 12:44 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Develop an app that does the reading from the DB and puts to MQ using a channel table. Does not matter which broker is up it will only get processed once, because your app can lock the record in the DB and update it so that it can only be processed once. => you can have multiple instances of the app doing this...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|