|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Multiple queue watchers |
« View previous topic :: View next topic » |
Author |
Message
|
klamerus |
Posted: Fri Jul 09, 2004 3:11 pm Post subject: Multiple queue watchers |
|
|
 Disciple
Joined: 05 Jul 2004 Posts: 199 Location: Detroit, MI
|
We have an application that consists of a number of programs (written in Visual C++ and running on Windows 2000) that perform specific tasks in a workflow.
The messages are self describing of what to do, and the next task that needs to be done (as well as the data upon which to operate).
Each program (which we call agents), do their work and then put the message on the queue of the next agent for further processing.
It all works quite well, but we want to improve overall system throughput by pointing several agents on any particular queue. Our servers aren't anywhere near capacity.
Is it possible to have multiple applications working from off of a single MQ queue? We're not using any sort of trigger. Our agents poll a queue for its depth, and if the depth is 0 they sleep for a parameterized number of seconds before checking again.
Can we get into any sort of a dead lock condition on pulling items off a queue? |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Jul 09, 2004 3:26 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Quote: |
Is it possible to have multiple applications working from off of a single MQ queue?
|
Yes, but if they are all coded to simply pick up the first message they come across (i.e. no matching by MI or CI), then it is undocumented as to which one will get the message. In other words don't count on 3 agents each getting 33.33% of the messages. But you can count on all 3 working ful time if there is enough volume being dumped onto the queue.
Quote: |
Our agents poll a queue for its depth, and if the depth is 0 they sleep for a parameterized number of seconds before checking again.
|
Don't poll. Use MQGET with a Wait Interval. You are wasting resources checking queue depths, sleeping, reissuing MQGETs, etc. Just issue the GET with wait and accept the message when it finally arrives.
Unless of course you are doing something in between those polls... _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
klamerus |
Posted: Fri Jul 09, 2004 5:44 pm Post subject: |
|
|
 Disciple
Joined: 05 Jul 2004 Posts: 199 Location: Detroit, MI
|
Thanks for the input on teh MQGET.
I inherited this puppy - and in my opinion, there's plenty to fix. I was wondering if that were an option. These agents are definitely not doing anything in between polls except sleeping.
The only thing that comes to mind is that they are Windows services and by having them in a loop, they won't get blocked to where they cannot be stopped from the Windows services control. |
|
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
|
|
|
|