Policies containing QQ and CMQ rules are ignored #7351
Replies: 4 comments 3 replies
-
Oops, a browser crash has wiped out my long comment. There are two types of validation performed on policies:
My best guess is that now the latter is performed by individual queue types. I'd expect log messages about this. There is no such thing as "safe classic mirrored queues" and they are getting close to being removed, so I don't know how much sense it would make to change this many years old behavior of the second "type" of validation. |
Beta Was this translation helpful? Give feedback.
-
Targeting policies by queue type is something that we are interested in adding. @adamncasey would you be happy with such a solution for this use case? Policy matching on queue-type discussion: #6217 |
Beta Was this translation helpful? Give feedback.
-
Yes, having a policy per queue type would solve this problem for us. Ignoring policy keys which are unknown also seems reasonable to me, but I might not have the full picture |
Beta Was this translation helpful? Give feedback.
-
Reviving this discussion thread for sake of context (happy to move to a separate discussion, if preferred): what is the team's thoughts on the current state of validation for "Whether all keys are known"? As noted by @michaelklishin, it seems this validation is being performed by queues, and not at policy-creation. Personally, I think it would be a better UX if we disallowed creation of policies with "unknown keys" for a particular queue type. I.e. a policy with If the team tends to agree with that, and it's just been a low-priority task, I'd be happy to take a shot at it. |
Beta Was this translation helpful? Give feedback.
-
I'm noticing that policies containing definitions relating to both quorum and classic queues do not get applied at all. This is awkward because policies cannot target a specific queue type. Which ultimately makes it impossible to define a vhost with policies for safe-by-default CMQs and QQs.
On RabbitMQ 3.11.6 / Erlang 25.1 I have created the following policies:
rabbitmqctl list_policies output
To demonstrate this I created four queues with highly imaginative names
qq.blah
- I'd expect this to matchpolicy-2
above, and it doescmq.blah
- I'd expect this to matchpolicy-3
above, and it does.blah
- I'd expect this to matchpolicy
above, but it doesn't.blahblah
- I'd also expect this to matchpolicy
above, but it doesn't. Note that in the screenshot below this queue has no mirrors.It seems to be a problem when policies contain properties for both classic and quorum queues
I feel a more workable strategy here is to ignore parts of policies which are not relevant for this particular queue type.
Beta Was this translation helpful? Give feedback.
All reactions