[rabbitmq-discuss] RabbitMQ 2.8.0 released
Simon MacMullen
simon at rabbitmq.com
Mon Mar 19 12:36:14 GMT 2012
On 19/03/12 12:24, Brendan Hay wrote:
> Would it be possible to describe in more (technical/erlangy) detail how
> the new flow-control mechanism works?
There's a few words at:
http://www.rabbitmq.com/memory.html
under "Per-Connection Flow Control", although that might not count as
"technical/erlangy". In terms of implementation:
* A process that forwards AMQP messages on inside the broker is issued
credit for each process it sends messages to.
* The receiving process will issue more credit as it processes these
messages.
* If a process which receives messages from inside the broker runs out
of credit, it will in turn stop issuing credit until it gets more.
* If a process which receives messages from the network runs out of
credit, it will stop reading from its socket until it gets more.
* See the 'credit_flow' module (and its call sites) for more details.
Since all the processes in the chain need to opt in to this new
mechanism for it to work, only the most common paths do flow control:
messages published via AMQP and STOMP. Messages published via other
direct client users (e.g. JSON-RPC or management) and messages which
arise spontaneously in the broker (dead lettering, log and trace
messages) are not flow controlled. Indeed it's hard to see how they
could be.
Cheers, Simon
--
Simon MacMullen
RabbitMQ, VMware
More information about the rabbitmq-discuss
mailing list