summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2010-12-09 08:24:52 +0000
committerAlexandru Scvortov <alexandru@rabbitmq.com>2010-12-09 08:24:52 +0000
commita1701d1fc94f65102e5c185c897379d0a5700bdf (patch)
tree560a7aaee34524af2ef87f2ddfd13665c184f670
parent31cfc20bf6158c0cf21afd4bbb896e3f2204ba0a (diff)
downloadrabbitmq-server-git-a1701d1fc94f65102e5c185c897379d0a5700bdf.tar.gz
add stats again; update docs
-rw-r--r--docs/rabbitmqctl.1.xml12
-rw-r--r--src/rabbit_channel.erl2
2 files changed, 14 insertions, 0 deletions
diff --git a/docs/rabbitmqctl.1.xml b/docs/rabbitmqctl.1.xml
index 6b02abe438..b02ec613ea 100644
--- a/docs/rabbitmqctl.1.xml
+++ b/docs/rabbitmqctl.1.xml
@@ -1134,6 +1134,18 @@
messages to the channel's consumers.
</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term>confirm</term>
+ <listitem><para>Confirm mode for the channel. Either
+ <command>none</command>, <command>single</command> or
+ <command>multiple</command>.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>unconfirmed</term>
+ <listitem><para>Number of published messages not yet
+ confirmed. On channels not in confirm mode, this
+ remains 0.</para></listitem>
+ </varlistentry>
</variablelist>
<para>
If no <command>channelinfoitem</command>s are specified then pid,
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 9f1f29747f..7471115e10 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -474,6 +474,7 @@ send_or_enqueue_ack(MsgSeqNo, QPid, ExchangeName,
maybe_incr_confirm_queue_stats(QPid, ExchangeName, State),
do_if_unconfirmed(MsgSeqNo, QPid,
fun(MSN, State1 = #ch{writer_pid = WriterPid}) ->
+ maybe_incr_stats([{ExchangeName, 1}], confirm, State1),
ok = rabbit_writer:send_command(
WriterPid, #'basic.ack'{
delivery_tag = MSN}),
@@ -484,6 +485,7 @@ send_or_enqueue_ack(MsgSeqNo, QPid, ExchangeName,
maybe_incr_confirm_queue_stats(QPid, ExchangeName, State),
do_if_unconfirmed(MsgSeqNo, QPid,
fun(MSN, State1 = #ch{held_confirms = As}) ->
+ maybe_incr_stats([{ExchangeName, 1}], confirm, State1),
start_confirm_timer(
State1#ch{held_confirms = gb_sets:add(MSN, As)})
end, State).