[jboss-user] [JBoss Messaging] - Re: Limiting the consumers & producers of a queue
simba_mb
do-not-reply at jboss.com
Tue May 20 20:55:52 EDT 2008
Maybe it's a little bit late to join the conversation, but better late than never. :)
The thing is that the message group idea only solves the problem if we want to limit the consumers to only one (1). If we want to have, let's say, max 3 consumers, then the message group idea is no longer useful.
For example: Let say that some operation or process needs (or occupies) 1 core in the processor to complete. Let say that we have a quad core processor (4 cores) in our server. We want to save one core for other operations. That leaves us to 3 cores to run 3 simultaneous processes. In this scenario it would be great to limit the consumers to 3. Maybe through an attribute in the settings-file for the specific queue and/or even set the limitation programatically.
Of course, we could create a singleton pool with mutex- or semafore-technology in each consumer to control the number of simultaneous processes. But this would (could) lead to transaction timeouts if the wait is too long between the first and last loaded consumer, which could fail the whole idea with QoS.
timfox: In your blog, you have described nicely the consumer flow control between the queue and the consumer:
http://jbossfox.blogspot.com/2008/03/mysteries-of-flow-control-explained.html
Is there a way, in the configuration or JMX bean, to control the number of tokens in the consumer flow control? If there are, I would really like to know how to manipulate them. That would really solve my problem. If not, is there a plan to make them visible in future versions of JBoss Messaging?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152170#4152170
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4152170
More information about the jboss-user
mailing list