[rabbitmq-discuss] Measuring end-to-end message delivery time

Matthias Radestock matthias at rabbitmq.com
Mon Dec 24 05:00:10 GMT 2012


Darrell,

On 23/12/12 04:01, dburgan at peopleanswers.com wrote:
> My goal is to measure the total time spent, per message, with
> millisecond accuracy, from one end of this pipeline to the other.
> [...]
> I can't just time-stamp the message because the local time on the two
> physical servers cannot be guaranteed to be synchronized to the
> millisecond. We use NTP but it does not keep the two servers that
> closely synchronized.

NTP is supposedly accurate to within a few milliseconds, and sub-ms if 
the machines are on a local network. Is that really not sufficient for 
your measurements?

> So my question is: does RabbitMQ offer anything I can use that will
> allow me to figure out how long step 4 took for each message I send
> through RabbitMQ, or at least approximate it closely?

I can't really see how rabbit can help you here. It could measure the 
time a message spends transiting it (*), but in the end that message 
still has to go across the network to the consumer machine, and if, as 
you say, the clock there is too far off the producer's then that hop 
will introduce significant inaccuracy.

Perhaps you could hook up GPS receivers to the producer and consumer 
machines. That should provide a very accurate time signal by which to 
keep the clocks in sync.


Regards,

Matthias.
(*) RabbitMQ doesn't in fact measure this, but provided messages contain 
some unique id, you could quite easily set up network taps to capture 
the time a message was received by rabbit and sent out again, respectively.


More information about the rabbitmq-discuss mailing list