diff options
author | Matthias Radestock <matthias@lshift.net> | 2010-02-04 21:09:26 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@lshift.net> | 2010-02-04 21:09:26 +0000 |
commit | 36a65040ef9fc62cbd8a79902301c60a4fd31fd5 (patch) | |
tree | 2389aa5ebd11a0f3164fc54e42ebab5a2c5ccea6 | |
parent | 88753611a142abdbed87a3b84c1080f8e1ee2121 (diff) | |
download | rabbitmq-server-bug21966.tar.gz |
make channel 'messages_unacknowledged' item semantics match that of queuesbug21966
namely, don't decrease the count for uncommitted acks
Also, add 'acks_uncommitted' info item, for completeness
-rw-r--r-- | docs/rabbitmqctl.1.pod | 5 | ||||
-rw-r--r-- | src/rabbit_channel.erl | 8 | ||||
-rw-r--r-- | src/rabbit_control.erl | 5 |
3 files changed, 14 insertions, 4 deletions
diff --git a/docs/rabbitmqctl.1.pod b/docs/rabbitmqctl.1.pod index 8921f7d7..a2521406 100644 --- a/docs/rabbitmqctl.1.pod +++ b/docs/rabbitmqctl.1.pod @@ -421,6 +421,11 @@ number of logical AMQP consumers retrieving messages via the channel number of messages delivered via this channel but not yet acknowledged +=item acks_uncommitted + +number of acknowledgements received in an as yet uncommitted +transaction + =item prefetch_count QoS prefetch count limit in force, 0 if unlimited diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index d0b0ee91..3aa9adfe 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 03520002..c28fd54f 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). |