Author |
Message
|
Bharat |
Posted: Wed Feb 01, 2006 2:35 pm Post subject: Load balancing with Queue Managers |
|
|
 Acolyte
Joined: 14 May 2002 Posts: 61 Location: Reston, VA, USA
|
Hi,
We have a J2EE application running on WebSphere application server and it uses external WebSphereMQ for messaging with MDB framework. We have two Solaris boxes on which our application runs and also MQ queue setup on both the boxes. Now we are doing the load balancing manually in the code by putting messages alternatively on different queues. In that case when we add additional boxes we need to change the code. Instead of this, is there any way to achieve load balancing using MQ clustering?
Here is our sample setup:
1. Java application puts a request message on ReqQueue1 on the queue manager QM1 of Box1 using client connection.
2. MDB picks up this message and after processing, it puts a response on RespQueue1 on the qmgr QM1 of Box1. The MDB knows that the request came from ReqQueue1 of QM1 and so puts the response on corresponding RespQueue1.
3. The Java application would be waiting on RespQueue1 on the qmgr QM1 of Box1 for the response.
4. Java application puts the next request on ReqQueue2 of qmgr QM2 on Box2 and will be waiting for a response on RespQueue2 of the qmgr QM2 on Box2. This way we are load balancing while putting messages.
By using MQ clustering or some other means, is there any way to achieve the following scenario?
1. Java application puts a request message on an AliasQueue using client connection.
2. The message should be available on any one of the queues on the qmgrs QM1 (Box1) or QM2 (Box2) or QM3 (Box3). MDBs will be available on all the boxes to pick up request messages. We need to achieve load balance between the qmgrs while putting messages.
3. The responses posted by different MDBs on different boxes should be targeted to a single AliasRespQueue. So that the client application would be listening on that particular AliasRespQueue.
I’m very much familiar with configuring MQ queues and channels but not familiar with MQ clustering. Can you please let me know the set up required for the above scenario? I appreciate your help.
Thanks in advance,
Bharat |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Feb 01, 2006 2:39 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Read the cluster manual and use a gateway qmgr.
Everything is explained in there.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
csmith28 |
Posted: Wed Feb 01, 2006 2:43 pm Post subject: |
|
|
 Grand Master
Joined: 15 Jul 2003 Posts: 1196 Location: Arizona
|
And recognize that the Gateway Cluster Configuration will introduce a single point of failure in to your application. If the Gateway Cluster MQManager goes down. All MQ traffic stops. _________________ Yes, I am an agent of Satan but my duties are largely ceremonial. |
|
Back to top |
|
 |
ashoon |
Posted: Wed Feb 01, 2006 3:06 pm Post subject: V6 of MQ |
|
|
Master
Joined: 26 Oct 2004 Posts: 235
|
I remember reading somewhere in V6 you can also 'spread' workload without the need of a gateway queue manager where you a client can connect to QMA and then write to a cluster queue on QMB even though a local q of the same name exists on QMA.
How do you do a req/response in that scenario - not quite sure... |
|
Back to top |
|
 |
JT |
Posted: Wed Feb 01, 2006 5:32 pm Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Quote: |
you can also 'spread' workload without the need of a gateway queue manager where you a client can connect to QMA..... |
And, as Chris pointed out, the same risk of a single point of failure exists. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Feb 01, 2006 6:42 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
JT wrote: |
Quote: |
you can also 'spread' workload without the need of a gateway queue manager where you a client can connect to QMA..... |
And, as Chris pointed out, the same risk of a single point of failure exists. |
that you can mitigate via Hardware clustering for the gateway QM _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
csmith28 |
Posted: Wed Feb 01, 2006 8:05 pm Post subject: |
|
|
 Grand Master
Joined: 15 Jul 2003 Posts: 1196 Location: Arizona
|
PeterPotkay wrote: |
JT wrote: |
Quote: |
you can also 'spread' workload without the need of a gateway queue manager where you a client can connect to QMA..... |
And, as Chris pointed out, the same risk of a single point of failure exists. |
that you can mitigate via Hardware clustering for the gateway QM |
Indeed but you can't do it with just MQSeries.
Please STOP IT!
Yes! Yes! Yes! Yes! Yes!, Yes! Yes! Yes! Yes! Yes! under certain limited circumstances WMQSeries does have load balancing capabilities but regardless of what some clueless IBM Salesman who is saying what he wants his customer to hear, may have told some clueless CEO who wants to hear about some magic middleware that will solve all his problems.
MQSeries is not a Loadbalancing Application nor is it a Failover application. WMQSeries is a very robust, reliable cross platform message delivery system.
If you want load balancing, put it in the application code. If you want failover put it in the app code or buy the software and hardware to support it. _________________ Yes, I am an agent of Satan but my duties are largely ceremonial. |
|
Back to top |
|
 |
|