|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Multiple Consumer to a Queue |
« View previous topic :: View next topic » |
Author |
Message
|
nithi |
Posted: Thu Apr 21, 2005 11:54 pm Post subject: Multiple Consumer to a Queue |
|
|
Newbie
Joined: 21 Apr 2005 Posts: 1
|
Hi,
We have a program that consumes messages from a Queue. To increase the performance, we are going to launch another instance of this program which also will listen to the same queue. But we dont want the same message to be delivered to both the instances.
Has any one done this before? I tried to launch 2 instances of the program both of them listening to the same queue. Each instance is consuming alternate messages and this improves the performance. Also, I dont see same message delivered to both the instances, which is exactly what we need. But I'm not sure if this is documented anywhere or is this the usual practise.
Can any one please throw more light on this? Any help is highly appreciated.
Thanks,
Nithi. |
|
Back to top |
|
 |
zpat |
Posted: Fri Apr 22, 2005 12:44 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
MQ will not allow more than one program to get the same message (Not, that is unless you are browsing the queue). We use this design extensively for workload distribution and failover.
It won't give messages exactly in turn to the programs, it depends how quicky they are processed. The same program might process two or more while the other one is busy with processing one. That is what is normally wanted anyway.
I would suggest doing the MQGET with SYNCPOINT, so that program failure would rollback the message making it available to be retrieved by the other program (but check the backout count to avoid a loop). |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|