[rabbitmq-discuss] Queue inspector.

matt matt at meez.com
Mon Nov 5 19:26:45 GMT 2007


Getting the message count only appears to get updated when you declare  
the queue.  What if you wanted to poll the queue and see how many  
messages were on it every 15 seconds or so?  Creating a new binding to  
the queue just to get the message count seems a bit expensive.

The main reason for wanting the message count is so that we can  
determine if we need to bring more consumer instances online when  
we're getting hammered (EC2 instances currently).

thx,
-matt

On Nov 5, 2007, at 10:20 AM, Matthias Radestock wrote:

> Matt,
>
> matt wrote:
>> First off, I want to say how much we love amqp and rabbitMQ!
>
> Thank you. It is always nice to hear from real users.
>
>> We've ( meez.com) been using it in our production environment (when
>> it was alpha) for about 6 months now I think.
>> In brief, we use rabbitMQ as a way of communicating with our
>> rendering cluster.  We have user facing tomcat servers that provide a
>> way of giving the user options to create an avatar.  Upon save, we
>> send export requests via rabbitMQ and they're picked up by nodes in
>> the export cloud.  Upon success of the rendered images, a
>> notification is sent back and the user is notified that the exports
>> were successful.
>
> That is a pretty neat use case, and it is good to hear that RabbitMQ
> worked out well for you.
>
>> the big immediate need we're looking for is a way to see how much is
>> being queued up on the rabbitMQ cluster.  That way, we can
>> programatically bring EC2 nodes up or take then down based on need.
>> I know that this is in the pipeline - but is there *any* way of doing
>> this now and/or is there something that could be easily added to  
>> support this?
>
> queue.declare-ok, the result of a queue.declare operation, in one of  
> its fields contains the number of messages in the queue. This is  
> part of the amqp 0-8 spec and implemented by RabbitMQ. In  
> combination with queue.declare's passive flag it allows you to  
> determine the length of existing queues.
>
> If you are using the RabbitMQ Java client, check out
> http://www.rabbitmq.com/javadoc/com/rabbitmq/client/impl/ChannelN.html#queueDeclare(int,%20java.lang.String,%20boolean,%20boolean,%20boolean,%20boolean,%20java.util.Map) 
> ,
> and
> http://www.rabbitmq.com/javadoc/com/rabbitmq/client/impl/AMQImpl.Queue.DeclareOk.html#getMessageCount()
>
> This is only a very limited interface - you need to know the names  
> of queues and you only get a report on the number of messages, not  
> their storage size etc - but perhaps that is sufficient for your  
> needs?
>
>
> Hope this helps, and thank you for using RabbitMQ,
>
>
> Matthias.


--
Matt Darling
Director, Server Engineering
Meez
182 2nd Street, 5th Floor
San Francisco, CA 94105
(m) 415.505.4623
matt at corp.meez.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20071105/2f6aa72a/attachment.htm 


More information about the rabbitmq-discuss mailing list