summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2019-11-29 19:39:21 +0300
committerGitHub <noreply@github.com>2019-11-29 19:39:21 +0300
commitab8bb7039619f3e7039c404f00f3bfbb6453aff0 (patch)
tree41778abacc2b6ea12aa0d9d3879c8fe9d3e45712 /src
parentbc392db8a02c347038ef41951f9b0882593ae5d4 (diff)
parent222b254121a1325f6b14f1c5e249c00c9477fe25 (diff)
downloadrabbitmq-server-git-ab8bb7039619f3e7039c404f00f3bfbb6453aff0.tar.gz
Merge pull request #2176 from rabbitmq/duplicated-consumers-metric
Remove duplicated consumers metric in quorum queues
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_quorum_queue.erl10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rabbit_quorum_queue.erl b/src/rabbit_quorum_queue.erl
index 5515bfd4cb..867af6cb75 100644
--- a/src/rabbit_quorum_queue.erl
+++ b/src/rabbit_quorum_queue.erl
@@ -252,14 +252,15 @@ handle_tick(QName,
0 -> 0;
_ -> rabbit_fifo:usage(Name)
end,
- Infos = [{consumers, C}, {consumer_utilisation, Util},
+ Infos = [{consumers, C},
+ {consumer_utilisation, Util},
{message_bytes_ready, MsgBytesReady},
{message_bytes_unacknowledged, MsgBytesUnack},
{message_bytes, MsgBytesReady + MsgBytesUnack},
{message_bytes_persistent, MsgBytesReady + MsgBytesUnack},
{messages_persistent, M}
- | infos(QName)],
+ | infos(QName, ?STATISTICS_KEYS -- [consumers])],
rabbit_core_metrics:queue_stats(QName, Infos),
rabbit_event:notify(queue_stats,
Infos ++ [{name, QName},
@@ -582,9 +583,12 @@ info(Q) ->
-spec infos(rabbit_types:r('queue')) -> rabbit_types:infos().
infos(QName) ->
+ infos(QName, ?STATISTICS_KEYS).
+
+infos(QName, Keys) ->
case rabbit_amqqueue:lookup(QName) of
{ok, Q} ->
- info(Q, ?STATISTICS_KEYS);
+ info(Q, Keys);
{error, not_found} ->
[]
end.