[rabbitmq-discuss] Querying broker info like rabbitmqctl does?
Matt Pietrek
mpietrek at skytap.com
Wed Oct 10 17:01:26 BST 2012
Thanks for the informative reply, Simon. It's about what I expected, but
didn't want to exclude the possibility that there was some other magic that
I wasn't aware of.
Matt
On Wed, Oct 10, 2012 at 2:34 AM, Simon MacMullen <simon at rabbitmq.com> wrote:
> On 09/10/12 18:54, Matt Pietrek wrote:
>
>> Now, I realize that this is an inherently racy circumstance.
>>
>
> As long as you realise that :-)
>
> I'm just
>> trying to reduce the window as much as possible. As I see it, I have
>> three options:
>>
>> * Crank up the default update interval, suppressing perf as I go to
>> smaller intervals
>>
>
> Sounds less than wonderful as you note.
>
> * Somehow query the broker in the same way that rabbitmqctl does. I
>>
>> assume this involves writing Erlang code, which I'd like to avoid
>> for time reasons.
>>
>
> Well it involves interaction with Erlang. You can join an Erlang
> distributed system from Java for example, and there exists code which uses
> this to get rabbitmqctl-like statistics.
>
> I can't say I'd recommend it though - complex and fragile.
>
> * Call rabbitmqctl and capture/parse the output.
>>
>
> This is probably easiest of the three. The output is designed to be easy
> to parse, FWIW.
>
> If you were interested in the messages_ready stat I'd suggest you passive
> declare the queue over AMQP - the declare-ok you get back will give you
> that number. But there's no space in the protocol for
> messages_unacknowledged :-(
>
> Cheers, Simon
>
> --
> Simon MacMullen
> RabbitMQ, VMware
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121010/d17953e0/attachment.htm>
More information about the rabbitmq-discuss
mailing list