diff options
| author | dcorbacho <dparracorbacho@piotal.io> | 2019-11-29 09:19:28 +0000 |
|---|---|---|
| committer | dcorbacho <dparracorbacho@piotal.io> | 2019-11-29 09:19:28 +0000 |
| commit | 222b254121a1325f6b14f1c5e249c00c9477fe25 (patch) | |
| tree | bbd801cde656feee53d80b180d2c938de5a413ac /src | |
| parent | 0fee9afc0832edd21915cfa69ab9b010307a5395 (diff) | |
| download | rabbitmq-server-git-222b254121a1325f6b14f1c5e249c00c9477fe25.tar.gz | |
Take consumers from `handle_tick` arguments, as stats from `infos` are not yet updated
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_quorum_queue.erl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rabbit_quorum_queue.erl b/src/rabbit_quorum_queue.erl index 77f076c757..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 = [{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. |
