Skip to content

Commit 9b12c9c

Browse files
Merge pull request #7656 from rabbitmq/mergify/bp/v3.12.x/pr-7654
Fix rabbit_policy:match_all/2 (backport #7654)
2 parents cedc6ed + d7bae13 commit 9b12c9c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

deps/rabbit/src/rabbit_policy.erl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ matches(Q, Policy) when ?is_amqqueue(Q) ->
198198
is_applicable(Q, pget(definition, Policy)) andalso
199199
match =:= re:run(Name, pget(pattern, Policy), [{capture, none}]) andalso
200200
VHost =:= pget(vhost, Policy);
201+
matches(#resource{kind = queue} = Resource, Policy) ->
202+
{ok, Q} = rabbit_amqqueue:lookup(Resource),
203+
matches(Q, Policy);
201204
matches(#resource{name = Name, kind = Kind, virtual_host = VHost} = Resource, Policy) ->
202205
matches_type(Kind, pget('apply-to', Policy)) andalso
203206
is_applicable(Resource, pget(definition, Policy)) andalso

0 commit comments

Comments
 (0)