Thanks for the informative reply, Simon. It&#39;s about what I expected, but didn&#39;t want to exclude the possibility that there was some other magic that I wasn&#39;t aware of.<br><br>Matt<br><br><div class="gmail_quote">
On Wed, Oct 10, 2012 at 2:34 AM, Simon MacMullen <span dir="ltr">&lt;<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 09/10/12 18:54, Matt Pietrek wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Now, I realize that this is an inherently racy circumstance.<br>
</blockquote>
<br></div>
As long as you realise that :-)<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
I&#39;m just<br>
trying to reduce the window as much as possible. As I see it, I have<br>
three options:<br>
<br></div>
� * Crank up the default update interval, suppressing perf as I go to<br>
� � smaller intervals<br>
</blockquote>
<br>
Sounds less than wonderful as you note.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
� * Somehow query the broker in the same way that rabbitmqctl does. I<div class="im"><br>
� � assume this involves writing Erlang code, which I&#39;d like to avoid<br>
� � for time reasons.<br>
</div></blockquote>
<br>
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.<br>
<br>
I can&#39;t say I&#39;d recommend it though - complex and fragile.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
� * Call rabbitmqctl and capture/parse the output.<br>
</blockquote>
<br>
This is probably easiest of the three. The output is designed to be easy to parse, FWIW.<br>
<br>
If you were interested in the messages_ready stat I&#39;d suggest you passive declare the queue over AMQP - the declare-ok you get back will give you that number. But there&#39;s no space in the protocol for messages_unacknowledged :-(<br>

<br>
Cheers, Simon<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, VMware<br>
</font></span></blockquote></div><br>