summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_amqqueue_process.erl10
-rw-r--r--src/rabbit_quorum_queue.erl8
2 files changed, 17 insertions, 1 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index 37ee8d0a15..1bb888e113 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -120,6 +120,8 @@
effective_policy_definition,
exclusive_consumer_pid,
exclusive_consumer_tag,
+ single_active_consumer_pid,
+ single_active_consumer_tag,
consumers,
consumer_utilisation,
memory,
@@ -1040,6 +1042,14 @@ i(exclusive_consumer_tag, #q{active_consumer = {_ChPid, ConsumerTag}, single_act
ConsumerTag;
i(exclusive_consumer_tag, _) ->
'';
+i(single_active_consumer_pid, #q{active_consumer = {ChPid, _Consumer}, single_active_consumer_on = true}) ->
+ ChPid;
+i(single_active_consumer_pid, _) ->
+ '';
+i(single_active_consumer_tag, #q{active_consumer = {_ChPid, Consumer}, single_active_consumer_on = true}) ->
+ rabbit_queue_consumers:consumer_tag(Consumer);
+i(single_active_consumer_tag, _) ->
+ '';
i(messages_ready, #q{backing_queue_state = BQS, backing_queue = BQ}) ->
BQ:len(BQS);
i(messages_unacknowledged, _) ->
diff --git a/src/rabbit_quorum_queue.erl b/src/rabbit_quorum_queue.erl
index ce5b4b5b6b..591776bf21 100644
--- a/src/rabbit_quorum_queue.erl
+++ b/src/rabbit_quorum_queue.erl
@@ -76,7 +76,9 @@
leader,
online,
members,
- open_files
+ open_files,
+ single_active_consumer_pid,
+ single_active_consumer_ctag
]).
-define(TICK_TIME, 1000). %% the ra server tick time
@@ -704,6 +706,10 @@ i(open_files, #amqqueue{pid = {Name, _},
quorum_nodes = Nodes}) ->
{Data, _} = rpc:multicall(Nodes, rabbit_quorum_queue, open_files, [Name]),
lists:flatten(Data);
+i(single_active_consumer_pid, _Q) ->
+ '';
+i(single_active_consumer_ctag, _Q) ->
+ '';
i(_K, _Q) -> ''.
open_files(Name) ->