Package org.acemq.rabbitmq.admin
Class PolicyInfo
java.lang.Object
org.acemq.rabbitmq.admin.PolicyInfo
A policy: settings applied to whatever matches a pattern.
The thing to understand before using one. A queue argument is fixed at declaration and cannot be changed without deleting the queue; a **policy is applied afterwards and can be changed at any time**. So `x-message-ttl` as an argument is permanent, and the same setting as a policy is editable — which is why operators reach for policies and why a topology comparison that only looks at arguments can be confidently wrong.
Two more traps worth knowing:
- Only one policy applies. Where several match, the highest priority wins outright — the definitions are not merged. A queue matching a broad policy and a narrow one gets exactly one of them.
- An argument beats a policy. If a queue was declared with
x-message-ttland a policy also sets it, the argument wins, and the policy appears to do nothing for reasons nothing reports.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PolicyInfo
-
-
Method Details
-
name
-
vhost
-
pattern
- Returns:
- the regular expression matched against queue and exchange names
-
applyTo
- Returns:
queues,exchanges,classic_queues,quorum_queuesorall
-
priority
public int priority()- Returns:
- the priority. Where several policies match, the highest wins outright
-
definition
- Returns:
- what the policy sets
-
toString
-