Policy debugger
Policies change how queues and exchanges behave (TTL, max length, dead-lettering, alternate exchanges…) without touching the code that declares them. They are also a common source of confusion: a policy matches by regular expression, only one policy applies at a time, and the effective value can come from the queue arguments or from a policy. RabbitGUI shows you exactly which policy applies and where each setting comes from.
Which policy applies to this queue?
Open a queue or an exchange and go to its Settings tab. The Policy card lists the policies whose pattern matches its name, in the same virtual host and for the same kind of object:
- When a single policy matches, its name is shown as a link.
- When several policies match, all of them are listed with their priority. The one that applies is marked with a check, and the others are crossed out and dimmed. RabbitMQ applies at most one policy per queue or exchange: the one with the highest priority.
Operator policies are shown the same way, in a separate Matched operator policy row.
The card then shows the definition of the applied policy, with each key translated into a readable label and a short explanation. Values that point to another entity, like a dead-letter exchange or an alternate exchange, are links you can click.
If nothing matches, the card says No policy matches.
Where does this setting come from?
In the queue and exchange settings, every setting that a policy can set shows where its value comes from:
- A Policy badge means the value is set by a policy.
- When the queue or exchange also declares its own argument with a different value, the argument value is shown crossed out above the policy value, so you see both at a glance.
Inspect a policy
Click any policy name to open it. The Information card shows its virtual host, name, pattern, what it applies to (queues, classic queues, quorum queues, streams, exchanges or all) and its priority. The Definition card shows every key of the policy with the same readable labels.
All policies are also listed on the Policies page, with their type, pattern, apply-to and priority, and support search, filters and custom views.
To learn more about how policies are matched, read debugging policies in RabbitMQ.