[rabbitmq-discuss] Stop producer and queue continue growing...
matthew at lshift.net
Fri Mar 12 10:49:41 GMT 2010
On Fri, Mar 12, 2010 at 12:10:38AM -0300, Gustavo Aquino wrote:
> So my question is why queue continue to grow ?
Messages can be buffered in many places. In your case, you're seeing
messages buffered in the channel, before they reach the queue. This is
why the numbers reported by things like rabbitmqctl list_queues should
not really be trusted - there can be many messages which you believe are
published but have not yet reached the queue - eg client TCP stack,
kernel buffers, network buffers, and the channel in the server. Try
sending a sync operation down, eg a queue.declare to (re)declare the
queue. That has to go through the channel behind all the backed up
publishes. When you get the queue.declare_ok back, it will contain a
different number - the number of messages in the queue at the point at
which the queue.declare was processed.
You also didn't mention which branch/version of rabbit you're using, nor
if you're publishing persistent messages (persistent messages to a
transient queue still *have* to be written to disk because they should
survive a crash, though not a clean shutdown).
More information about the rabbitmq-discuss