Author |
Message
|
maja |
Posted: Thu Nov 08, 2007 2:00 pm Post subject: Problem with msgs not being load balanced across Q Mgrs |
|
|
Apprentice
Joined: 13 Jun 2006 Posts: 30
|
hi,
I am new to the clustering world.
We have a QM QueueManager1, and there are 2 other Queue Managers QueueManager2, and QueueManager3.
QueueManager1 is on server1. QueueManager2, and QueueManager3 are on Server 2. All three QM's are in Cluster.
Application connects to QueueManager1. There is a Queue COMMON.QUEUE on QueueManager2 and QueueManager3. It is shared in Cluster. When application tries to put messages to COMMON.QUEUE; the messages all go to only one queuemanager.
e.g.
I run application 1st time, all messages go to QueueManager2. I run second time all messages go to QueueManager3. and so on it repeats.
The messages are not load balanced when application is run once.
When I run the applicaiton once it sends 500+ messages to the Queue, I am expecting 250 to go to one QueueManager2, and 250 to QueueManager3.
Please tell me if MQ works for load balancing this way. What could be the possible issue with the cluster not doing the load balancing for the purpose.
Please advise.
Thanks,
Maja. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Nov 08, 2007 2:12 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The sending app is specifying MQOO_BIND_ON_OPEN or MQOO_BIND_AS_QDEF. If it's specifying MQOO_BIND_AS_QDEF, then the DEFBIND on both COMMON.QUEUE is set to OPEN. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
maja |
Posted: Thu Nov 08, 2007 3:02 pm Post subject: |
|
|
Apprentice
Joined: 13 Jun 2006 Posts: 30
|
Thanks Jeff.
The program uses MQOO_OUTPUT and MQOO_FAIL_IF_QUIESCING.
Should I introduce the BIND_AS_QDEF in the open options for the program, would that help.
Main point is the version of MQ is 5.3 and the Operating System is Win2K.
Please advise.
Thanks,
Maja |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 08, 2007 3:57 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Specify DEFBIND(NOTFIXED) on both cluster queues. _________________ MQ & Broker admin |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Nov 08, 2007 4:57 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
fjb_saper wrote: |
Specify DEFBIND(NOTFIXED) on both cluster queues. |
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
maja |
Posted: Thu Nov 08, 2007 10:52 pm Post subject: |
|
|
Apprentice
Joined: 13 Jun 2006 Posts: 30
|
Thanks a lot Jeff and Saper.
Thanks,
Maja. |
|
Back to top |
|
 |
maja |
Posted: Fri Nov 09, 2007 3:39 pm Post subject: |
|
|
Apprentice
Joined: 13 Jun 2006 Posts: 30
|
My query is answered.
With respect to the property on Queue for Binding on Open; would it ever be useful in a clustered environment.
E.g.
If I have 2 Queue Managers QM1 and QM2 that have the same Queue QUEUE.INPUT and are in cluster with QM3. Would it be ever useful to have the bind set to on Open? Or for clustered Queue it is always recommended to have Not Fixed.
Please advise.
Thanks,
Maja. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Nov 09, 2007 4:41 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
maja wrote: |
Would it be ever useful to have the bind set to on Open? Or for clustered Queue it is always recommended to have Not Fixed. |
If you designed you app so that if Message # 1 was processed by the app connected to QMx and you needed messages #2 thru #10 to be processed by that same instance connected to QMx, then you can insure messages 1 thru 10 go to QMx by using bind on open.
But, this is called message affinity. It is bad when you have designed your app with message affinity because it limits your flexability. What happens when messages 1-5 make and then QMx goes down? With message affinity messages # 6-10 will be stuck in a cluster transmit queue waiting for QMx to come back. And that's Without message affinity each message is free to go to any QM in the cluster. And that's  _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
maja |
Posted: Fri Nov 09, 2007 5:05 pm Post subject: |
|
|
Apprentice
Joined: 13 Jun 2006 Posts: 30
|
Thanks Peter.
That information helps. My application does not have message affinity.
If an application keeps running 24/7, it would continue to populate QM1 only, is there a way to specify that after 10 messages to QM1, send remaining to QM2.
Thanks,
Maja. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Nov 09, 2007 5:19 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
There is nothing that specific in MQ that you could set. Look up the CLWLWGHT attribute for cluster channels. That allows you to control the total % of messages going to a particular QM in the cluster.
Otherwise you will have to control the destination of each message in the putting app, which sort of defeats the purpose of clustering.
Or you can write some custome workload cluster exit.  _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|