diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2012-09-28 15:21:42 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2012-09-28 15:21:42 +0100 |
commit | 2f0729042ad6f7adf81ea509809c29f9bb24c8f6 (patch) | |
tree | 1720d07f0aeb1bcac644f0517ae06ae09a5b8f5e | |
parent | 18e04626b5cb7d0e6c286012e51d2b6225a8e18f (diff) | |
download | rabbitmq-server-2f0729042ad6f7adf81ea509809c29f9bb24c8f6.tar.gz |
active_consumers info item.
-rw-r--r-- | docs/rabbitmqctl.1.xml | 8 | ||||
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/docs/rabbitmqctl.1.xml b/docs/rabbitmqctl.1.xml index 11d85e9e..6c4ee7d5 100644 --- a/docs/rabbitmqctl.1.xml +++ b/docs/rabbitmqctl.1.xml @@ -986,6 +986,14 @@ <listitem><para>Number of consumers.</para></listitem> </varlistentry> <varlistentry> + <term>active_consumers</term> + <listitem><para>Number of active consumers. An active + consumer is one which could immediately receive any + messages sent to the queue. At least one of + messages_ready and active_consumers must always be + zero.</para></listitem> + </varlistentry> + <varlistentry> <term>memory</term> <listitem><para>Bytes of memory consumed by the Erlang process associated with the queue, including stack, heap and internal structures.</para></listitem> diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 10ac5bea..55bd970c 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -92,6 +92,7 @@ messages_unacknowledged, messages, consumers, + active_consumers, memory, slave_pids, synchronised_slave_pids, @@ -914,6 +915,8 @@ i(messages, State) -> messages_unacknowledged]]); i(consumers, _) -> consumer_count(); +i(active_consumers, _) -> + active_consumer_count(); i(memory, _) -> {memory, M} = process_info(self(), memory), M; |