April 30, 2025•2 min read
While the rules that RabbitMQ applies to choose which policy to apply to a queue are known, it can be cumbersome to debug and try to understand exactly which policy is applied and why. You can use the management plugin to go back and forth between the policies and the queues, but it is not very convenient. In this article we are going to use RabbitGUI to debug policies in RabbitMQ much faster.
Open RabbitGUI and go to the queue you are interested in. In the "Settings" tab you should see a "Policy" section indicating if the queue has a policy applied to it or not. In this case, the queue has no policy applied to it:
If a policy is applied to the queue, it will be shown under the "Matched policy" label in the "Policy" card. Here we can see that the policy "My policy" is applied and that it defines both "Max length" and "Message TTL".
Note that those values are also present in the "information" card with a "Policy" badge attached to it, meaning that those values come from the policy and not from the queue itself.
Sometimes both the queue itself and the policy may define the same value. In this case, RabbitMQ will apply the value defined by the policy. RabbitGUI makes it easy to see which value is overridden directly from the UI, here the "Max length" value is overridden by the policy, showing the queue's value 500 crossed over.
Since policies use regexp to match the name of queues, it is possible that multiple policies match the same queue. In this case, RabbitMQ will apply the policy with the highest priority. RabbitGUI shows you all the policies that match a queue, and highlights the one that is applied for easy debugging.
Debug, monitor, and manage RabbitMQ with a modern developer interface.
Try now