[
http://jira.jboss.com/jira/browse/JBMESSAGING-1199?page=all ]
Tim Fox updated JBMESSAGING-1199:
---------------------------------
Summary: Improvements to consumer flow control (was: Improve flow control)
Description:
The current consumer flow control algorithm sends messages from server to client as fast
as it can.
The client sends a stop message when the client buffer reaches it's max size. It then
sends a start message when the buffer reaches half it's max size.
An issue can arise here when sending from server-->client is fast, in that due to the
finite amount of time sending the stop message to the server, significantly more messages
than max buffer size can arrives at the consumer buffer.
While this is to be expected - the buffer size is not a hard limit. This can cause
undesired effects when there are many consumers consuming from a queue and message
processing rate is fairly slow - resulting in some slow consumers buffering many of the
messages so they are not available to other consumers.
Workaround for this is to turn of bufering altogether by setting slowConsumers to true on
the connection factory, but this may be too drastic.
The algorithm should be changed so the server stops sending when bufferSize messages have
been sent and starts again when receives a start from the consumer.
This should result in a hard limit to buffer size and much smoother distribution of
messages across competing consumers on a queue.
was:
The current consumer flow control algorithm can result in many more messages than the
buffer size arriving at a client consumer, since the server does not stop sending until it
receives a stop message.
For fast messaging this should even out. But when consumers are slower this can cause
problems.
The algorithm should instead automatically stop sending when buffer size messages are
sent, and wait for a change rate +.
This should make distribution between many consumers much smoother.
Workaround for now is to set slowConsumes = true. But this effectively turns off buffering
altogether.
Improvements to consumer flow control
-------------------------------------
Key: JBMESSAGING-1199
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-1199
Project: JBoss Messaging
Issue Type: Task
Reporter: Tim Fox
Assigned To: Tim Fox
Fix For: Stable branch
The current consumer flow control algorithm sends messages from server to client as fast
as it can.
The client sends a stop message when the client buffer reaches it's max size. It then
sends a start message when the buffer reaches half it's max size.
An issue can arise here when sending from server-->client is fast, in that due to the
finite amount of time sending the stop message to the server, significantly more messages
than max buffer size can arrives at the consumer buffer.
While this is to be expected - the buffer size is not a hard limit. This can cause
undesired effects when there are many consumers consuming from a queue and message
processing rate is fairly slow - resulting in some slow consumers buffering many of the
messages so they are not available to other consumers.
Workaround for this is to turn of bufering altogether by setting slowConsumers to true on
the connection factory, but this may be too drastic.
The algorithm should be changed so the server stops sending when bufferSize messages have
been sent and starts again when receives a start from the consumer.
This should result in a hard limit to buffer size and much smoother distribution of
messages across competing consumers on a queue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira