[rabbitmq-discuss] Latency of publish confirm

Matthias Radestock matthias at rabbitmq.com
Tue Dec 4 08:55:13 GMT 2012


On 04/12/12 05:06, Pierpaolo Baccichet wrote:
> I am running a very small experiment to evaluate the latency of the
> publish call and I am seeing that rabbitMQ holds the ack for roughly
> 25 milliseconds before sending it to the publisher. [...] Why is
> this happening? Is RabbitMQ trying to aggregate multiple messages
> together before delivering them on the network?

I am guessing your messages are marked as persistent. The 25ms is indeed
an aggregation interval, but for the disk (in particular fsyncs) rather
than the network.

> There will be a lot of publisher processes (order of magnitude in the
> tens of thousands) and each publisher will have a fairly low message
> per second rate (let's say 1 message per second).

The aggregation will go across all puplishers, so you will see much 
higher rates. A quick experiment on my machine using the MulticastMain 
program that ships with the Java client shows a rate of 1500Hz with 500 
producers publishing to a single queue in "wait for confirmation after 
every message" mode (MCM -f persistent -c 1 -x 500 -i 10).



More information about the rabbitmq-discuss mailing list