[rabbitmq-discuss] flow control issues

Matthew Sackman matthew at rabbitmq.com
Sat Sep 18 23:30:16 BST 2010


On Fri, Sep 17, 2010 at 04:32:09PM +0200, romary.kremer at gmail.com wrote:
> Can you give us hints about how the production was indeed paused,
> other by stopping reading from the socket ?

The client itself understands the channel.flow messages that come from
the broker. Thus the client then itself blocks any publishes that the
application does, waiting for permission from the broker to resume
publishing.

> Does the broker shut the connection or only the channel if a
> content-bearing message is sent after the flow.control ?

I can't remember. I would think it should be channel only on the grounds
that other channels that may be consuming messages have done nothing
wrong. However, for that to happen is basically a client error: the
client itself should understand the channel flow messages and make
sending content-bearing messages a blocking operation at that point.

> What is the meaning of status "Blocked" and "Blocking" that we can
> gather by listing connections ! I often noticed that
> the connection of producer in status "blocked" lead the connection
> of the consumer to be "Blocking".

That will mean that channel.flow{active=false} has been sent to the
client, and then that channel.flow_ok has been received back by the
server.

> Sharing the same connection for producer and consumer, by the use of
> Channel may not be safe, that is very sad !

Well, it's fine provided you have a client that works properly and you
understand that at times, publishing a content bearing message may be a
blocking operation, and code accordingly.

Matthew


More information about the rabbitmq-discuss mailing list