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

Eric Mill konklone at gmail.com
Sat Dec 29 00:25:56 GMT 2012

What I'd do is snapshot the time, down to the millisecond, on both servers, 
both before and after the message goes through the pipeline (to verify that 
they didn't drift apart or closer during the message sending event). Then 
timestamp the message and use the time delta between the two servers to 
adjust the message sent and receive timestamps to figure out the true time 
it took to send the message.

-- Eric

On Saturday, December 22, 2012 11:01:34 PM UTC-5, dbu... at peopleanswers.com 
> Firstly, kudos to the RabbitMQ team for an astonishingly good product. We 
> are using it as the messaging bus backbone for our flagship application and 
> have had literally zero problems with it. Can't say enough good things.
> I'm hoping someone can help me figure out a solution for this. When we 
> send a message, it generally goes through a pipeline something like this:
> 1. (Sending JVM) A Java thread will push the message into a 
> ThreadPoolExecutor queue.
> 2. (Sending JVM) The ThreadPoolExecutor sends the message to RabbitMQ.
> 3. RabbitMQ delivers the message to the consumer.
> 4. (Receiving JVM) The consumer receives the message and pushes it into a 
> ThreadPoolExecutor queue
> 5. (Receiving JVM) The ThreadPoolExecutor handles the message
> My goal is to measure the total time spent, per message, with millisecond 
> accuracy, from one end of this pipeline to the other. I want to be able to 
> calculate this for every message sent through our message bus, so then I 
> can do analysis on those times, in real-time, and draw useful conclusions.
> The trouble is that the part pre-RabbitMQ (1-2) could be in a different 
> JVM on a different physical server than the part post-RabbitMQ (4-5). So I 
> can measure the time for steps 1, 2, 4, and 5. But how do I measure the 
> time it took for the message to actually travel through RabbitMQ (step 3)?
> 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.
> 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? Or is there some other clever 
> technoloogy I could use to accomplish the same thing?
> Thanks in advance,
> Darrell Burgan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121228/da1ee576/attachment.htm>

More information about the rabbitmq-discuss mailing list