Take the 2-minute tour ×

Given a cluster of RabbitMQ nodes with a bunch of queues getting messages from a topic exchange, I would like to be able to programmatically answer the question:

For queue X, what is the current rough estimate on message delivery/roundtrip times?

Using the RabbitMQ management plugin's API for introspection, I can think of a whole bunch of ways of doing it, none of which would be terribly hard to implement ([number of queued messages + 1] * average processing time), but it all kind of feels a bit like reinventing the wheel. Are there any established best practices? Maybe even some out-of-the-box mechanisms provided by RabbitMQ?

(For the record, we're talking to RabbitMQ 2.4.1 from Ruby, using good old bunny 0.6.0 with some custom abstraction code on top.)

share|improve this question
add comment

1 Answer

I've implemented PoC to do something like what you ask using the RabbitMQ Erlang client. You can see a demo of that here: http://vimeo.com/20966661

The pattern used is called Smart Proxy as explained on the Enterprise Integration Patterns book.

Then to see a code example take a look at this library: https://github.com/videlalvaro/rmq_patterns

Look for the amqp_smart_proxy.erl file

share|improve this answer
Mm… now that I read again… what I showed you will work mostly for a RPC kind of setup… still you could get ideas out of it. –  old_sound May 10 '11 at 15:41
add comment

Your Answer


