[rabbitmq-discuss] Publisher Confirms stop occurring when Consumer is present and queue is large

Cameron Davison cameron.davison at gmail.com
Mon Oct 31 23:24:02 GMT 2011


I am using RabbitMQ version 2.6.1 of the server.

I created a durable direct exchange with the java client and then
declared a durable, not exclusive, not autoDelete queue and then bound
the exchange and the queue together. Then I set confirm select to true
to start writing messages to the queue. I am publishing messages to
the broker in batches of 2000 as MINIMAL_PERSISTENT_BASIC and the
calling channel.waitForConfirms() to block until all the messages have
been confirmed. This works rather well with an empty queue with a
consumer, and when there is no consumer present. I then setup a
basicConsumer as a QueueingConsumer with ack=true. I am acking every
1k messages I receive with multiple set to true. I am reading and
writing basically as fast as possible, not much code in the critical
path, just to test that RabbitMQ works as I would expect.

I start the writer process to start writing and waiting for confirms
from rabbit and it starts fine. After about 30 seconds, so at this
point many messages have been queued up in the queue, I start the
reader. As soon as I start the reader the writer process stops
receiving confirms. I can even see in the management console that it
shows the 2000 confirms that the writer channel is waiting on. I tried
restarting the writer but it still does not get any confirms while the
reader process is reading from rabbitmq. It will stay like this until
the reader empties the queue and I assume starts acking things that
were written so the confirms are coming from the consumer ack rather
than the writes to disk. Is this expected behavior? Do I have it
configured to not fsync to disk while there is a consumer reading the
messages, would that even possible?

Thanks,
Cameron


More information about the rabbitmq-discuss mailing list