Skip to content

Commit 39222b5

Browse files
author
Daniil Fedotov
committed
Queue supervisor location for per-vhost supervisor
1 parent ddb99fe commit 39222b5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/rabbit_ct_broker_helpers.erl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,9 +1107,11 @@ get_connection_pids(Connections) ->
11071107
end, rabbit_networking:connections()).
11081108

11091109
%% Return the PID of the given queue's supervisor.
1110-
get_queue_sup_pid(QueuePid) ->
1111-
Sups = supervisor:which_children(rabbit_amqqueue_sup_sup),
1112-
get_queue_sup_pid(Sups, QueuePid).
1110+
get_queue_sup_pid(#amqqueue { pid = QPid, name = QName }) ->
1111+
VHost = QName#resource.virtual_host,
1112+
{ok, AmqSup} = rabbit_amqqueue_sup_sup:find_for_vhost(VHost, node(QPid)),
1113+
Sups = supervisor:which_children(AmqSup),
1114+
get_queue_sup_pid(Sups, QPid).
11131115

11141116
get_queue_sup_pid([{_, SupPid, _, _} | Rest], QueuePid) ->
11151117
WorkerPids = [Pid || {_, Pid, _, _} <- supervisor:which_children(SupPid)],

0 commit comments

Comments
 (0)