Skip to content

Commit d7bae13

Browse files
HoloRinmergify[bot]
authored andcommitted
Fix rabbit_policy:match_all/2 (#7654)
When rabbit_policy:match_all/2 is called with a name of a queue look up the queue type to correctly match the extra policy granularity added in #7601 (cherry picked from commit f73145b)
1 parent cedc6ed commit d7bae13

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)