[rabbitmq-discuss] Latency between publish and wait

Matthias Radestock matthias at lshift.net
Mon Nov 23 21:28:56 GMT 2009


Frederick,

Frederick Ryckbosch wrote:
> The total execution time of this :
> 
> chan.basic_publish(amqp.Message(msg.body), exchange="xchange",  
> routing_key="test")
> chan.wait() # Waiting on the queue
> 
> is 40ms. When I profiled the code, it spends most of its time waiting  
> on the socket.
> 
> Is 40 ms a normal latency between putting in the exchange to getting  
> it from the queue ?
> Or am I doing something terribly wrong ?

With the RabbitMQ Java client we see latencies in the hundreds of 
microseconds on moderate throughput. Looks like py-amqplib is a lot 
slower. One possible cause might be that the socket isn't configured 
with Nagle disabled, but I haven't looked at the code to check.


Regards,

Matthias.




More information about the rabbitmq-discuss mailing list