summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2010-02-04 21:09:26 +0000
committerMatthias Radestock <matthias@lshift.net>2010-02-04 21:09:26 +0000
commite7b2fda90f41d2af0ed4e8788f6db462d0e419c5 (patch)
tree2389aa5ebd11a0f3164fc54e42ebab5a2c5ccea6 /src
parentb3711bfb0cf231d352ef96d9b95f01780d2731a2 (diff)
downloadrabbitmq-server-git-e7b2fda90f41d2af0ed4e8788f6db462d0e419c5.tar.gz
make channel 'messages_unacknowledged' item semantics match that of queues
namely, don't decrease the count for uncommitted acks Also, add 'acks_uncommitted' info item, for completeness
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_channel.erl8
-rw-r--r--src/rabbit_control.erl5
2 files changed, 9 insertions, 4 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index d0b0ee9132..3aa9adfee6 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -62,6 +62,7 @@
transactional,
consumer_count,
messages_unacknowledged,
+ acks_uncommitted,
prefetch_count]).
%%----------------------------------------------------------------------------
@@ -1017,8 +1018,11 @@ i(vhost, #ch{virtual_host = VHost}) -> VHost;
i(transactional, #ch{transaction_id = TxnKey}) -> TxnKey =/= none;
i(consumer_count, #ch{consumer_mapping = ConsumerMapping}) ->
dict:size(ConsumerMapping);
-i(messages_unacknowledged, #ch{unacked_message_q = UAMQ}) ->
- queue:len(UAMQ);
+i(messages_unacknowledged, #ch{unacked_message_q = UAMQ,
+ uncommitted_ack_q = UAQ}) ->
+ queue:len(UAMQ) + queue:len(UAQ);
+i(acks_uncommitted, #ch{uncommitted_ack_q = UAQ}) ->
+ queue:len(UAQ);
i(prefetch_count, #ch{limiter_pid = LimiterPid}) ->
rabbit_limiter:get_limit(LimiterPid);
i(Item, _) ->
diff --git a/src/rabbit_control.erl b/src/rabbit_control.erl
index 0352000292..c28fd54f8f 100644
--- a/src/rabbit_control.erl
+++ b/src/rabbit_control.erl
@@ -194,8 +194,9 @@ and state.
<ChannelInfoItem> must be a member of the list [pid, connection,
number, user, vhost, transactional, consumer_count,
-messages_unacknowledged, prefetch_count]. The default is to display
-pid, user, transactional, consumer_count, messages_unacknowledged.
+messages_unacknowledged, acks_uncommitted, prefetch_count]. The
+default is to display pid, user, transactional, consumer_count,
+messages_unacknowledged.
"),
halt(1).