summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmile Joubert <emile@rabbitmq.com>2012-10-03 12:00:53 +0100
committerEmile Joubert <emile@rabbitmq.com>2012-10-03 12:00:53 +0100
commit06d8fc293c2061b1c3ee995239242823f2d2b795 (patch)
treed50ddf29be584472669b44b036c966bd2847ec3c
parentbb87426c775813281470c2841c781efdd203db2c (diff)
parentafeeb9e94bcef3bd591d6715818017a88486d44d (diff)
downloadrabbitmq-server-git-06d8fc293c2061b1c3ee995239242823f2d2b795.tar.gz
Merged bug25193
-rw-r--r--docs/rabbitmqctl.1.xml21
-rw-r--r--src/rabbit_amqqueue_process.erl3
2 files changed, 24 insertions, 0 deletions
diff --git a/docs/rabbitmqctl.1.xml b/docs/rabbitmqctl.1.xml
index 11d85e9e03..73347ceafe 100644
--- a/docs/rabbitmqctl.1.xml
+++ b/docs/rabbitmqctl.1.xml
@@ -986,6 +986,27 @@
<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 - i.e. it is not limited by its
+ prefetch count, TCP congestion, flow control, or
+ because it has issued channel.flow. At least one
+ of messages_ready and active_consumers must always
+ be zero.
+ </para>
+ <para>
+ Note that this value is an instantaneous snapshot
+ - when consumers are restricted by their prefetch
+ count they may only appear to be active for small
+ fractions of a second until more messages are sent
+ out.
+ </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 dfd0ab7e19..e68d691e3f 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,
@@ -910,6 +911,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;