[rabbitmq-discuss] Queue info
Alexis Richardson
alexis.richardson at cohesiveft.com
Thu Feb 28 08:25:43 GMT 2008
Thanks Tony.
One other thing that we have been talking about and would love to
share with others is this: how best to expose these erlang 'management
functions', such as they are, to users of other languages?
What would people most like to see? One idea would be to expose
functions remotely over queues (as reified RPC messages) and then use
the AMQP, STOMP or HTTP interfaces externally. Another approach would
be to use one of the GUI tools, one of the prototype flex clients.
Any thoughts?
alexis
On Thu, Feb 28, 2008 at 7:15 AM, Tony Garnock-Jones <tonyg at lshift.net> wrote:
> Hi Ying,
>
>
> Ying He wrote:
> > Is there any way in RabbitMQ server for the admin to check for example:
> > How many queues are currently in the system?
> > How many messages that each one has processed and each one still holds
> > waiting for the consumer to process?
>
> There is an undocumented way of doing this. If you start the broker by
> running rabbitmq-server, then you end up at an erlang shell (if you
> don't see the prompt, tap enter to make it reprint it). If you have the
> broker running in the background, you need to attach an erlang shell to
> it, with a command along the lines of "erl -sname temp -remsh
> rabbit at yourmachine", running as the same user as the rabbit server.
>
> At the erlang prompt, type "rabbit_amqqueue:stat_all().", which will
> produce a brief report on the status of the queues in the system. This
> tells you how many there are, how many consumers are listening on each,
> and how many messages are backlogged on each. There is no indication of
> how many messages have been through the queues yet. For example:
>
> (rabbit at walk)1> rabbit_amqqueue:stat_all().
> [{ok,{resource,<<"/">>,queue,<<"bar">>},0,1},
> {ok,{resource,<<"/">>,queue,<<"foo">>},0,1}]
>
> The example shows two queues, "foo" and "bar", each with a single
> consumer attached (in fact a LogTail.exe instance from our .NET client),
> and neither with any messages waiting to be consumed. The result of the
> stat_all() call is a list of {status, fully-qualified-queue-name,
> message-queue-length, consumer-count} tuples.
>
> Regards,
> Tony
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
--
Alexis Richardson
+44 20 7617 7339 (UK)
+44 77 9865 2911 (cell)
+1 650 206 2517 (US)
More information about the rabbitmq-discuss
mailing list