PageSourceSearch

https://www.rabbitmq.com/assets/js/140ffe71.2f70306d.js

js rabbitmq.com collected 2026-09-24 06:05:18 UTC 67,960 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkrabbitmq_website=self.webpackChunkrabbitmq_website||[]).push([["14342"],{28437(e,i,n){n.r(i),n.d(i,{metadata:()=>l,default:()=>u,frontMatter:()=>o,contentTitle:()=>c,toc:()=>h,assets:()=>d});var l=JSON.parse('{"id":"policies","title":"Policies","description":"\x3c!--","source":"@site/versioned_docs/version-4.3/policies.md","sourceDirName":".","slug":"/policies","permalink":"/docs/policies","draft":false,"unlisted":false,"editUrl":"https://github.com/rabbitmq/rabbitmq-website/tree/main/versioned_docs/version-4.3/policies.md","tags":[],"version":"4.3","frontMatter":{"title":"Policies"},"sidebar":"docsSidebar","previous":{"title":"AMQP 0-9-1 Authentication Mechanisms","permalink":"/docs/authentication"},"next":{"title":"Runtime Parameters","permalink":"/docs/parameters"}}'),a=n(74848),t=n(28453),r=n(50773),s=n(57250);let o={title:"Policies"},c="Policies",d={},h=[{value:"Overview",id:"overview",level:2},{value:"Why Policies Exist",id:"why",level:2},{value:"Policies vs. The Optional Arguments Set by Applications",id:"policies-vs-the-optional-arguments-set-by-applications",level:3},{value:"How Policies Work",id:"how-policies-work",level:3},{value:"What Cannot Be Set Using a Policy",id:"what-cannot-be-set-using-a-policy",level:3},{value:"How to Define a Policy",id:"defining",level:2},{value:"Policy Priorities",id:"priorities",level:3},{value:"Combining Policy Definitions",id:"combining-policy-definitions",level:3},{value:"Deleting a Policy",id:"deleting",level:2},{value:"Declaring an Override (a Temporary Overriding Policy)",id:"override",level:2},{value:"Declaring a Blanket Policy",id:"blanket",level:2},{value:"Updating Policies",id:"updating",level:2},{value:"Policy Redefinition",id:"redefining",level:3},{value:"Deleting Policy Definition Keys",id:"deleting-keys",level:3},{value:"Partially Updating Policy Definition",id:"patching",level:3},{value:"Operator Policies",id:"operator-policies",level:2},{value:"Difference From Regular Policies",id:"why-operator-policies-exist",level:3},{value:"Conflict Resolution with Regular Policies",id:"operator-policy-conflicts",level:3},{value:"Defining Operator Policies",id:"operator-policy-definition",level:3},{value:"How to Disable Operator Policy Changes",id:"disable-operator-policy-changes",level:3},{value:"Pre-configuring Default Operator Policies for New Virtual Hosts",id:"default-operator-policies",level:3},{value:"Updating Operator Policies",id:"operator-policy-updating",level:2},{value:"Operator Policy Redefinition",id:"operator-policy-redefining",level:3},{value:"Deleting Operator Policy Definition Keys",id:"operator-policy-deleting-keys",level:3},{value:"Partially Updating Operator Policy Definition",id:"operator-policy-patching",level:3},{value:"Deleting an Operator Policy",id:"operator-policy-deleting",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2},{value:"Multiple Policies Have Conflicting Priorities",id:"multiple-policies-have-conflicting-priorities",level:3},{value:"Policy Pattern or Target Type Does Not Match Object's Name or Type",id:"policy-pattern-or-target-type-does-not-match-objects-name-or-type",level:3},{value:"Policy Declared in the Wrong Virtual Host",id:"policy-declared-in-the-wrong-virtual-host",level:3}];function p(e){let i={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.header,{children:(0,a.jsx)(i.h1,{id:"policies",children:"Policies"})}),"\n",(0,a.jsx)(i.h2,{id:"overview",children:"Overview"}),"\n",(0,a.jsxs)(i.p,{children:["While much of the configuration for RabbitMQ lives in\nthe ",(0,a.jsx)(i.a,{href:"./configure",children:"configuration file"}),", some things\ndo not mesh well with the use of a configuration file:"]}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"If they need to be the same across all nodes in a cluster"}),"\n",(0,a.jsx)(i.li,{children:"If they are likely to change at run time"}),"\n"]}),"\n",(0,a.jsxs)(i.p,{children:["Such values in RabbitMQ are stored as ",(0,a.jsx)(i.a,{href:"./parameters",children:"runtime parameters"}),".\nPolicies is one example of how runtime parameter are used."]}),"\n",(0,a.jsx)(i.p,{children:"This guide focuses on policies and operator policies."}),"\n",(0,a.jsx)(i.h2,{id:"why",children:"Why Policies Exist"}),"\n",(0,a.jsx)(i.admonition,{type:"tip",children:(0,a.jsx)(i.p,{children:"Policies is a declarative mechanism of configuring certain properties of groups\nof queues, streams, exchanges. They are designed for parameters that can change at runtime."})}),"\n",(0,a.jsx)(i.admonition,{type:"note",children:(0,a.jsxs)(i.p,{children:["Since queue (stream) type is set at declaration time and cannot be changed, policies cannot\nbe used to configure queue type, by design. To specify queue (stream) type, use ",(0,a.jsx)(i.a,{href:"./queues#optional-arguments",children:"optional arguments"}),"."]})}),"\n",(0,a.jsxs)(i.p,{children:["Policies is a declarative, ",(0,a.jsx)(i.a,{href:"./vhosts",children:"virtual host"}),"-scoped mechanism for dynamically [re]configuring ",(0,a.jsx)(i.a,{href:"./queues#optional-arguments",children:"optional arguments"}),"\nfor queues, exchanges, streams, and some plugins (namely ",(0,a.jsx)(i.a,{href:"./federation",children:"federation"}),")."]}),"\n",(0,a.jsx)(i.h3,{id:"policies-vs-the-optional-arguments-set-by-applications",children:"Policies vs. The Optional Arguments Set by Applications"}),"\n",(0,a.jsx)(i.p,{children:"Before we explain what policies are and how to use them it would\nbe helpful to explain why they were introduced to RabbitMQ."}),"\n",(0,a.jsxs)(i.p,{children:["In addition to mandatory properties\n(e.g. ",(0,a.jsx)(i.co
1de,{children:"durable"})," or ",(0,a.jsx)(i.code,{children:"exclusive"}),"),\nqueues and exchanges in RabbitMQ have ",(0,a.jsx)(i.a,{href:"./queues#optional-arguments",children:"optional arguments"}),",\nsometimes referred to as ",(0,a.jsx)(i.code,{children:"x-arguments"}),"."]}),"\n",(0,a.jsxs)(i.p,{children:["Those are provided by clients when\nthey declare queues (exchanges) and control various optional\nfeatures, such as ",(0,a.jsx)(i.a,{href:"./maxlength",children:"queue length limit"})," or\n",(0,a.jsx)(i.a,{href:"./ttl",children:"TTL"}),"."]}),"\n",(0,a.jsx)(i.p,{children:"Client-controlled properties in some of the protocols RabbitMQ supports\ngenerally work well but they can be inflexible: updating TTL values\nor mirroring parameters that way required application changes, redeployment\nand queue re-declaration (which involves deletion). In addition, there is\nno way to control the extra arguments for groups of queues and exchanges.\nPolicies were introduced to address the above pain points."}),"\n",(0,a.jsx)(i.p,{children:"A policy matches one or more queues by name (using a regular\nexpression pattern) and appends its definition (a map of\noptional arguments) to the x-arguments of the matching\nqueues. In other words, it is possible to configure\nx-arguments for multiple queues at once with a policy, and\nupdate them all at once by updating policy definition."}),"\n",(0,a.jsx)(i.p,{children:"In modern versions of RabbitMQ the set of features which can\nbe controlled by policy is not the same as the set of\nfeatures which can be controlled by client-provided\narguments."}),"\n",(0,a.jsx)(i.h3,{id:"how-policies-work",children:"How Policies Work"}),"\n",(0,a.jsx)(i.p,{children:"Key policy attributes are"}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"name: it can be anything but ASCII-based names without spaces are recommended"}),"\n",(0,a.jsx)(i.li,{children:"pattern: a regular expression that matches one or more queue (exchange) names.\nAny regular expression can be used."}),"\n",(0,a.jsx)(i.li,{children:"definition: a set of key/value pairs (think a JSON document) that will be injected\ninto the map of optional arguments of the matching queues and exchanges"}),"\n",(0,a.jsxs)(i.li,{children:[(0,a.jsx)(i.a,{href:"#priorities",children:"policy priority"})," used to determine which policy should be\napplied to a queue or exchange if multiple policies match its name"]}),"\n"]}),"\n",(0,a.jsxs)(i.p,{children:["Policies automatically match against exchanges and queues,\nand help determine how they behave. Each exchange or queue\nwill have at most one policy matching (see ",(0,a.jsx)("a",{href:"#combining-policy-definitions",children:"Combining Policy Definitions"})," below),\nand each policy then injects a set of key-value pairs (policy definition) on to the matching\nqueues (exchanges)."]}),"\n",(0,a.jsxs)(i.p,{children:["Policies can match only queues of a specific type, all queues, only exchanges, or all queues and exchanges.\nThis is controlled using the ",(0,a.jsx)(i.code,{children:"apply-to"})," flag when a policy is created."]}),"\n",(0,a.jsx)(i.p,{children:"Policies can change at any time. When a policy definition is\nupdated, its effect on matching exchanges and queues will be\nreapplied. Usually it happens instantaneously but for very\nbusy queues can take a bit of time (say, a few seconds)."}),"\n",(0,a.jsx)(i.p,{children:"Policies are matched and applied every time an exchange or\nqueue is created, not just when the policy is created."}),"\n",(0,a.jsx)(i.p,{children:"Policies can be used to configure"}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:(0,a.jsx)(i.a,{href:"./federation",children:"federation"})}),"\n",(0,a.jsx)(i.li,{children:(0,a.jsx)(i.a,{href:"./ae",children:"alternate exchanges"})}),"\n",(0,a.jsxs)(i.li,{children:[(0,a.jsx)(i.a,{href:"./dlx",children:"dead lettering"}),","]}),"\n",(0,a.jsx)(i.li,{children:(0,a.jsx)(i.a,{href:"./ttl",children:"per-queue TTLs"})}),"\n",(0,a.jsx)(i.li,{children:(0,a.jsx)(i.a,{href:"./maxlength",children:"queue length limit"})}),"\n"]}),"\n",(0,a.jsx)(i.p,{children:"and other features."}),"\n",(0,a.jsx)(i.h3,{id:"what-cannot-be-set-using-a-policy",children:"What Cannot Be Set Using a Policy"}),"\n",(0,a.jsx)(i.p,{children:"Some optional arguments cannot be configured using a policy. They control various settings\nthat cannot be changed at runtime. Two key examples are:"}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:"The type of a queue"}),"\n",(0,a.jsxs)(i.li,{children:["The ",(0,a.jsx)(i.a,{href:"./priority",children:"maximum number of priorities"})," of classic queues (quorum queues always provide a fixed 32-level range, also not configurable by a policy)"]}),"\n"]}),"\n",(0,a.jsx)(i.p,{children:"Those values intentionally cannot be configured by policies: their values are fixed at queue declaration time."}),"\n",(0,a.jsx)(i.h2,{id:"defining",children:"How to Define a Policy"}),"\n",(0,a.jsx)(i.p,{children:"An example of defining a policy looks like:"}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"bash",label:"rabbitmqctl with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.co
1de,{className:"language-bash",children:'rabbitmqctl set_policy federate-me \\\n    "^federated\\." \'{"federation-upstream-set":"all"}\' \\\n    --priority 1 \\\n    --apply-to exchanges\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqadmin policies declare \\\n    --name "federate-me" \\\n    --pattern "^federated\\." \\\n    --definition \'{"federation-upstream-set":"all"}\' \\\n    --priority 1 \\\n    --apply-to "exchanges"\n'})})}),(0,a.jsx)(s.A,{value:"PowerShell",label:"rabbitmqctl with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqctl.bat set_policy federate-me ^\n    "^federated\\." "{""federation-upstream-set"":""all""}" ^\n    --priority 1 ^\n    --apply-to exchanges\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqadmin.exe policies declare ^\n    --name "federate-me" ^\n    --pattern "^federated\\." ^\n    --definition "{""federation-upstream-set"":""all""}" ^\n    --priority 1 ^\n    --apply-to "exchanges"\n'})})}),(0,a.jsx)(s.A,{value:"HTTP API",label:"HTTP API",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-ini",children:'PUT /api/policies/%2f/federate-me\n    {"pattern": "^federated\\.",\n     "definition": {"federation-upstream-set":"all"},\n     "priority": 1,\n    "apply-to": "exchanges"}\n'})})}),(0,a.jsx)(s.A,{value:"Management UI",label:"Management UI",children:(0,a.jsxs)("ol",{children:[(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:["Navigate to ",(0,a.jsx)(i.code,{children:"Admin"})," > ",(0,a.jsx)(i.code,{children:"Policies"})," > ",(0,a.jsx)(i.code,{children:"Add / update a     policy"}),"."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:['Enter a policy name (such as "federated") next to Name, a pattern (such as "^federated.") next to\nPattern, and select what kind of entities (exchanges in this example) the policy should apply to using the ',(0,a.jsx)(i.code,{children:"Apply to"}),"\ndrop down."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:['Enter "federation-upstream-set" = "all" (or a specific upstream name) in the first line next to\n',(0,a.jsx)(i.code,{children:"Policy"}),"."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:["Click ",(0,a.jsx)(i.code,{children:"Add policy"}),"."]})})]})})]}),"\n",(0,a.jsx)(i.admonition,{type:"danger",children:(0,a.jsxs)(i.p,{children:["When multiple policies match an entity and they all have equal priorities, the effective one\nwill be chosen undeterministically. ",(0,a.jsx)(i.strong,{children:"Such cases should be avoided"})," by paying attention\nto what priorities various policies use."]})}),"\n",(0,a.jsxs)(i.p,{children:["This matches the value ",(0,a.jsx)(i.code,{children:'"all"'})," with the key\n",(0,a.jsx)(i.code,{children:'"federation-upstream-set"'})," for all exchanges\nwith names beginning with ",(0,a.jsx)(i.code,{children:'"federated."'}),", in the\nvirtual host ",(0,a.jsx)(i.code,{children:'"/"'}),"."]}),"\n",(0,a.jsxs)(i.p,{children:["The ",(0,a.jsx)(i.code,{children:'"pattern"'})," argument is a regular expression used\nto match exchange or queue names."]}),"\n",(0,a.jsx)(i.p,{children:"In the event that more than one policy can match a given\nexchange or queue, the policy with the greatest priority applies."}),"\n",(0,a.jsxs)(i.p,{children:["The ",(0,a.jsx)(i.code,{children:'"apply-to"'})," argument can be one of the following:"]}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsxs)(i.li,{children:[(0,a.jsx)(i.code,{children:'"exchanges"'}),", applies to exchanges only"]}),"\n",(0,a.jsxs)(i.li,{children:[(0,a.jsx)(i.code,{children:'"queues"'}),", applies to all types of queues, including streams"]}),"\n",(0,a.jsxs)(i.li,{children:[(0,a.jsx)(i.code,{children:'"classic_queues"'}),", applies to classic queues only"]}
1),"\n",(0,a.jsxs)(i.li,{children:[(0,a.jsx)(i.code,{children:'"quorum_queues"'}),", applies to quorum queues only"]}),"\n",(0,a.jsxs)(i.li,{children:[(0,a.jsx)(i.code,{children:'"streams"'}),", applies to streams only"]}),"\n",(0,a.jsxs)(i.li,{children:[(0,a.jsx)(i.code,{children:'"all"'}),", applies to all exchanges and queues (including streams)"]}),"\n"]}),"\n",(0,a.jsxs)(i.p,{children:["The ",(0,a.jsx)(i.code,{children:'"apply-to"'})," and ",(0,a.jsx)(i.code,{children:'"priority"'})," settings are optional.\nThe default values are ",(0,a.jsx)(i.code,{children:'"all"'})," and ",(0,a.jsx)(i.code,{children:'"0"'})," respectively."]}),"\n",(0,a.jsx)(i.h3,{id:"priorities",children:"Policy Priorities"}),"\n",(0,a.jsxs)(i.p,{children:["Policy ",(0,a.jsx)(i.strong,{children:"patterns"})," are matched against exchange and queue ",(0,a.jsx)(i.strong,{children:"names"})," to determine what policy (if any)\nshould then inject a set of key-value pairs (the definition of that policy) into the ",(0,a.jsx)(i.a,{href:"./queues#optional-arguments",children:"optional arguments"}),"\nof matching queues (exchanges)."]}),"\n",(0,a.jsxs)(i.p,{children:[(0,a.jsx)(i.strong,{children:"At most one policy matches"})," a queue or exchange. Since multiple policies can match a single\nname, a mechanism is needed to resolve such policy conflicts. This mechanism is called policy priorities.\nEvery policy has a a numeric priority associated with it. This priority can be specified when declaring\na policy. If not explicitly provided, the priority of 0 (a very low one) will be used."]}),"\n",(0,a.jsxs)(i.admonition,{type:"important",children:[(0,a.jsxs)(i.p,{children:[(0,a.jsx)(i.strong,{children:"At most one policy matches"})," a queue or exchange. Matching policies are then sorted by priority\nand the one with the highest priority will take\neffect."]}),(0,a.jsx)(i.p,{children:"Higher values indicate higher priority: a policy with priority 10 will overrule a policy with priority 8,\nand both will overrule the default priority of 0."})]}),"\n",(0,a.jsx)(i.admonition,{type:"danger",children:(0,a.jsxs)(i.p,{children:["When multiple policies match an entity and they all have equal priorities, the effective one\nwill be chosen undeterministically. ",(0,a.jsx)(i.strong,{children:"Such cases should be avoided"})," by paying attention\nto what priorities various policies use."]})}),"\n",(0,a.jsx)(i.p,{children:"Matching policies are then sorted by priority and the one with the highest priority will take\neffect."}),"\n",(0,a.jsxs)(i.p,{children:["When multiple policies match an entity and they all have equal priorities, the effective one\nwill be chosen undeterministically. ",(0,a.jsx)(i.strong,{children:"Such cases should be avoided"})," by paying attention\nto what priorities various policies use."]}),"\n",(0,a.jsx)(i.h3,{id:"combining-policy-definitions",children:"Combining Policy Definitions"}),"\n",(0,a.jsx)(i.p,{children:"In some cases we might want to apply more than one policy\ndefinition to a resource. For example we might need a queue to\nbe federated and has message TTL. At most one policy will apply to a\nresource at any given time, but we can apply multiple\ndefinitions in that policy."}),"\n",(0,a.jsx)(i.admonition,{type:"tip",children:(0,a.jsxs)(i.p,{children:["See ",(0,a.jsx)(i.a,{href:"#updating",children:"Updating Policies"})," below as well."]})}),"\n",(0,a.jsxs)(i.p,{children:["A federation policy definition would require an ",(0,a.jsx)("em",{children:"upstream set"}),"\nto be specified, so we would need the ",(0,a.jsx)(i.code,{children:"federation-upstream-set"}),"\nkey in our definition. On the other hand to define some queues as TTL-enabled,\nwe would need the TTL-related keys key to be defined as well for the\npolicy. The policy definition is just a JSON object and can have multiple\nkeys combined in the same policy definition."]}),"\n",(0,a.jsx)(i.p,{children:"Here's an example:"}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"bash",label:"rabbitmqctl with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.co
1de,{className:"language-bash",children:'rabbitmqctl set_policy ttl-fed \\\n    "^tf\\." \'{"federation-upstream-set":"all", "message-ttl":60000}\' \\\n    --priority 1 \\\n    --apply-to queues\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:"rabbitmqadmin policies declare \\\n    --name 'ttl-fed' \\\n    --definition '{\"federation-upstream-set\":\"all\", \"message-ttl\":60000}' \\\n    --pattern '^tf\\.' \\\n    --priority 1 \\\n    --apply-to 'queues'\n"})})}),(0,a.jsx)(s.A,{value:"PowerShell",label:"rabbitmqctl.bat with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqctl set_policy ttl-fed ^\n    "^tf\\." "{""federation-upstream-set"":""all"", ""message-ttl"":60000}" ^\n    --priority 1 ^\n    --apply-to queues\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqadmin.exe policies declare ^\n    --name "ttl-fed" ^\n    --definition "{""federation-upstream-set"":""all"", ""message-ttl"":60000}" ^\n    --pattern "^tf\\." ^\n    --priority 1 ^\n    --apply-to "queues"\n'})})}),(0,a.jsx)(s.A,{value:"HTTP API",label:"HTTP API",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-ini",children:'PUT /api/policies/%2f/ttl-fed\n    {"pattern": "^tf\\.",\n    "definition": {"federation-upstream-set":"all", "message-ttl":60000},\n    "priority": 1,\n    "apply-to": "queues"}\n'})})}),(0,a.jsx)(s.A,{value:"Management UI",label:"Management UI",children:(0,a.jsxs)("ol",{children:[(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:["Navigate to ",(0,a.jsx)(i.code,{children:"Admin"})," > ",(0,a.jsx)(i.code,{children:"Policies"})," > ",(0,a.jsx)(i.code,{children:"Add / update a     policy"}),"."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:['Enter a policy name (such as "federated") next to Name, a pattern (such as "^federated.") next to\nPattern, and select what kind of entities (queues in this example) the policy should apply to using the ',(0,a.jsx)(i.code,{children:"Apply to"}),"\ndrop down."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:['Enter "federation-upstream-set" = "all" (or a specific upstream name) in the first line next to\n',(0,a.jsx)(i.code,{children:"Policy"}),"."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:["Click ",(0,a.jsx)(i.code,{children:"Add policy"}),"."]})})]})})]}),"\n",(0,a.jsxs)(i.p,{children:['By doing that all the queues matched by the pattern "^tf\\." will have the ',(0,a.jsx)(i.code,{children:'"federation-upstream-set"'}),"\nand the policy definitions applied to them."]}),"\n",(0,a.jsx)(i.h2,{id:"deleting",children:"Deleting a Policy"}),"\n",(0,a.jsxs)(i.p,{children:["A policy can be deleted using ",(0,a.jsx)(i.code,{children:"rabbitmqctl clear_policy"})," or ",(0,a.jsx)(i.code,{children:"rabbitmqadmin policies delete"}),"."]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"bash",label:"rabbitmqctl with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqctl clear_policy --vhost "vh.1" "policy.name"\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqadmin --vhost "vh.1" policies delete --name "policy.name"\n'})})}),(0,a.jsx)(s.A,{value:"PowerShell",label:"rabbitmqctl with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqctl.bat clear_policy --vhost "vh.1" "policy.name"\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqadmin.exe --vhost "vh.1" policies delete --name "policy.name"\n'})})}),(0,a.jsx)(s.A,{value:"HTTP API",label:"HTTP API",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.co
1de,{className:"language-ini",children:"DELETE /api/policies/vh.1/policy.name\n"})})}),(0,a.jsx)(s.A,{value:"Management UI",label:"Management UI",children:(0,a.jsxs)("ol",{children:[(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:["Navigate to ",(0,a.jsx)(i.code,{children:"Admin"})," > ",(0,a.jsx)(i.code,{children:"Policies"})," > Click on the policy to delete."]})}),(0,a.jsx)("li",{children:(0,a.jsx)(i.p,{children:'Click "Delete this policy"'})}),(0,a.jsx)("li",{children:(0,a.jsx)(i.p,{children:"Confirm the operation."})})]})})]}),"\n",(0,a.jsx)(i.h2,{id:"override",children:"Declaring an Override (a Temporary Overriding Policy)"}),"\n",(0,a.jsxs)(i.p,{children:[(0,a.jsx)(i.a,{href:"./management-cli",children:(0,a.jsx)(i.code,{children:"rabbitmqadmin"})})," can be used to declare an override, or an overriding policy."]}),"\n",(0,a.jsx)(i.p,{children:"This is a policy that applies to the same set of objects (e.g. queues) as an existing policy\nbut contains a different definition and a higher priority (by 100, to be exact)."}),"\n",(0,a.jsxs)(i.p,{children:["Overriding policies are meant to be short-lived, for example, to enable queue federation\nduring the final stage of a ",(0,a.jsx)(i.a,{href:"./blue-green-upgrade/",children:"Blue/Green cluster migration"}),"."]}),"\n",(0,a.jsxs)(i.p,{children:["The following example uses ",(0,a.jsx)(i.code,{children:"rabbitmqadmin policies declare_override"}),' to override a policy\nnamed "pol.1" and injects a ',(0,a.jsx)(i.a,{href:"./federated-queues",children:"queue federation"}),"-related key."]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:"rabbitmqadmin --vhost 'vh.1' policies declare_override --name 'pol.1' --definition '{\"federation-upstream-set\": \"all\"}'\n"})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqadmin.exe --vhost "vh.1" policies declare_override --name "pol.1" --definition "{""federation-upstream-set"": ""all""}"\n'})})})]}),"\n",(0,a.jsxs)(i.p,{children:["Overrides prefix original policy names with ",(0,a.jsx)(i.code,{children:'"overrides."'})," and truncate the result\nat 255 bytes, the policy name length limit."]}),"\n",(0,a.jsxs)(i.p,{children:["Deleting an overriding policy is no different from deleting any other policy.\nUse ",(0,a.jsx)(i.code,{children:"rabbitmqadmin policies delete --name [override policy name]"})]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:"rabbitmqadmin --vhost 'vh.1' policies delete --name 'overrides.pol.1'\n"})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqadmin.exe --vhost "vh.1" policies delete --name "overrides.pol.1"\n'})})})]}),"\n",(0,a.jsx)(i.h2,{id:"blanket",children:"Declaring a Blanket Policy"}),"\n",(0,a.jsx)(i.p,{children:"A blanket policy is a policy that covers all queues not covered by other\npolicies. By definition, such policies match all names."}),"\n",(0,a.jsx)(i.p,{children:"To make sure it does not affect other policies, blanket policies use negative priorities."}),"\n",(0,a.jsxs)(i.p,{children:["While such a blanket queue can be declared using ",(0,a.jsx)(i.code,{children:"rabbitmqctl"})," with the pattern of ",(0,a.jsx)(i.code,{children:".*"})," and a negative priority,\n",(0,a.jsxs)(i.a,{href:"./management-cli",children:[(0,a.jsx)(i.code,{children:"rabbitmqadmin"})," v2"]})," provides a dedicated command for declaring\nsuch specialized policies:"]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.co
1de,{className:"language-bash",children:"# This queue will match all objects in the vh.1 virtual host, that are not matched by another policy.\n# To that end, it uses a negative priority and '.*' for the pattern.\nrabbitmqadmin --vhost 'vh.1' policies declare_blanket \\\n    --name 'blanket.queues' \\\n    --apply-to 'queues' \\\n    --definition '{\"federation-upstream-set\": \"all\"}'\n"})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'# This queue will match all objects in the vh.1 virtual host, that are not matched by another policy.\n# To that end, it uses a negative priority and \'.*\' for the pattern.\nrabbitmqadmin.exe --vhost "vh.1" policies declare_blanket ^\n    --name "blanket.queues" ^\n    --apply-to "queues" ^\n    --definition "{""federation-upstream-set"": ""all""}"\n'})})})]}),"\n",(0,a.jsxs)(i.p,{children:["Blanket policies are often temporary in nature and used for specific purposes,\nsuch as enabling ",(0,a.jsx)(i.a,{href:"./federated-queues",children:"queue federation"})," during a ",(0,a.jsx)(i.a,{href:"./blue-green-upgrade",children:"Blue-Green Deployment-style"})," migration\nfrom one cluster to another."]}),"\n",(0,a.jsx)(i.h2,{id:"updating",children:"Updating Policies"}),"\n",(0,a.jsx)(i.p,{children:"A policy can be updated by re-declaring it with a different definition, priority, and so on.\nThis requires the operator to have a full policy definition."}),"\n",(0,a.jsxs)(i.p,{children:["Alternatively, ",(0,a.jsxs)(i.a,{href:"./management-cli",children:[(0,a.jsx)(i.code,{children:"rabbitmqadmin"})," v2"]})," provides commands that can modify\npolicy definitions, declare override policies and blanket policies."]}),"\n",(0,a.jsx)(i.h3,{id:"redefining",children:"Policy Redefinition"}),"\n",(0,a.jsxs)(i.p,{children:["If a full policy definition is known, ",(0,a.jsx)(i.a,{href:"#defining",children:"redefining"})," a policy with an updated definition\nand (optionally) a new priority but the same original name will update it."]}),"\n",(0,a.jsx)(i.admonition,{type:"important",children:(0,a.jsx)(i.p,{children:"The effects of new settings on queues, streams and exchanges will take a moment to become effective,\nin particular for clusters with a large number of entites (say, thousands)."})}),"\n",(0,a.jsx)(i.h3,{id:"deleting-keys",children:"Deleting Policy Definition Keys"}),"\n",(0,a.jsxs)(i.p,{children:["To delete one or multiple keys from a policy definition, use ",(0,a.jsx)(i.a,{href:"./management-cli",children:(0,a.jsx)(i.code,{children:"rabbitmqadmin policies delete_definition_keys"})}),":"]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'# removes all keys related to classic queue mirroring (that feature was removed in RabbitMQ 4.x)\n# from the definition of a policy named "cq.policies.1" in virtual host vh-1\nrabbitmqadmin --vhost "vh-1" policies delete_definition_keys --name "cq.policies.1" --definition-keys "ha-mode,ha-params,ha-promote-on-shutdown,ha-promote-on-failure,ha-sync-mode,ha-sync-batch-size"\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'# removes all keys related to classic queue mirroring (that feature was removed in RabbitMQ 4.x)\n# from the definition of a policy named "cq.policies.1" in virtual host vh-1\nrabbitmqadmin.exe --vhost "vh-1" policies delete_definition_keys --name "cq.policies.1" --definition-keys "ha-mode,ha-params,ha-promote-on-shutdown,ha-promote-on-failure,ha-sync-mode,ha-sync-batch-size"\n'})})})]}),"\n",(0,a.jsxs)(i.p,{children:["The ",(0,a.jsx)(i.code,{children:"--definitions-keys"})," parameter accepts a single definition key or a command-separated list of keys."]}),"\n",(0,a.jsxs)(i.p,{children:["To perform the same operation across all policies in a virtual host, use ",(0,a.jsx)(i.a,{href:"./management-cli",children:(0,a.jsx)(i.co
1de,{children:"rabbitmqadmin policies delete_definition_keys_from_all_in"})}),":"]}),"\n",(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'# removes all keys related to classic queue mirroring (that feature was removed in RabbitMQ 4.x)\n# from all policy definitions in virtual host vh-1\nrabbitmqadmin --vhost "vh-1" policies delete_definition_keys_from_all_in --definition-keys "ha-mode,ha-params,ha-promote-on-shutdown,ha-promote-on-failure,ha-sync-mode,ha-sync-batch-size"\n'})}),"\n",(0,a.jsx)(i.h3,{id:"patching",children:"Partially Updating Policy Definition"}),"\n",(0,a.jsxs)(i.p,{children:[(0,a.jsx)(i.a,{href:"./management-cli",children:(0,a.jsx)(i.code,{children:"rabbitmqadmin policies patch"})})," is a command that can update a policy\nusing a partial definition, for example, to add a ",(0,a.jsxs)(i.a,{href:"./maxlength/",children:[(0,a.jsx)(i.code,{children:"max-length"})," key"]})," to an existing\npolicy:"]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqadmin policies patch \\\n    --name "cq.pol.1" \\\n    --definition \'{"max-length": 1000000}\'\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqadmin.exe policies patch ^\n    --name "cq.pol.1" ^\n    --definition "{""max-length"": 1000000}"\n'})})})]}),"\n",(0,a.jsxs)(i.p,{children:["The new ",(0,a.jsx)(i.code,{children:"--definition"})," object will be merged into the existing policy definition."]}),"\n",(0,a.jsxs)(i.p,{children:["In the following example, an existing policy named ",(0,a.jsx)(i.code,{children:"queues.pol.1"})," in the default virtual host (",(0,a.jsx)(i.code,{children:"/"}),")\nis updated to enable ",(0,a.jsx)(i.a,{href:"./federated-queues",children:"queue federation"})," to all the configured upstreams for the matched queues,\nwithout affecting the rest of the policy definitions:"]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqadmin policies patch \\\n    --name "queues.pol.1" \\\n    --definition \'{"federation-upstream-set":"all"}\'\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqadmin.exe policies patch ^\n    --name "cq.pol.1" ^\n    --definition \'{"federation-upstream-set":"all""}"\n'})})})]}),"\n",(0,a.jsx)(i.h2,{id:"operator-policies",children:"Operator Policies"}),"\n",(0,a.jsx)(i.h3,{id:"why-operator-policies-exist",children:"Difference From Regular Policies"}),"\n",(0,a.jsxs)(i.p,{children:["Sometimes it is necessary for the operator to enforce certain policies.\nFor example, it may be desirable to force ",(0,a.jsx)(i.a,{href:"./ttl",children:"queue TTL"})," but\nstill let other users manage policies. Operator policies allow for that."]}),"\n",(0,a.jsx)(i.p,{children:"Operator policies are much like regular ones but their\ndefinitions are used differently. They are merged with\nregular policy definitions before the result is applied to\nmatching queues."}),"\n",(0,a.jsx)(i.p,{children:"Because operator policies can unexpectedly change queue\nattributes and, in turn, application assumptions and\nsemantics, they are limited only to a few arguments:"}),"\n",(0,a.jsxs)("table",{children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{}),(0,a.jsx)("th",{children:"Classic"}),(0,a.jsx)("th",{children:"Quorum"}),(0,a.jsx)("th",{children:"Stream"})]})}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"delivery-limit"}),(0,a.jsx)("td",{}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"expires"}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"max-in-memory-bytes"}),(0,a.jsx)("td",{}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"max-in-memory-length"}),(0,a.jsx)("td",{}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"max-length"}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"max-length-bytes"}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"message-ttl"}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"overflow"}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"queue-version"}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsx)("td",{}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"target-group-size"}),(0,a.jsx)("td",{}),(0,a.jsxs)("td",{children:[" ",(0,a.jsx)("span",{children:"\u2713"})," "]}),(0,a.jsx)("td",{})]})]})]}),"\n",(0,a.jsx)(i.h3,{id:"operator-policy-conflicts",children:"Conflict Resolution with Regular Policies"}),"\n",(0,a.jsxs)(i.p,{children:["An operator policy and a regular policy can contain the same\nkeys in their definitions. When it happens, the more conservative\nvalue is chosen as effective. For example, if a matching\noperator policy definition sets ",(0,a.jsx)(i.co
1de,{children:"max-length"})," to\n50 and a matching regular policy definition uses the value of 100,\nthe value of 50 will be used. If, however, regular policy's value\nwas 20, it would be used. Operator policies, therefore, don't\njust overwrite regular policy values. They enforce limits but\ntry to not override user-provided policies where possible."]}),"\n",(0,a.jsxs)("table",{children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{}),(0,a.jsx)("th",{children:"Classic"}),(0,a.jsx)("th",{children:"Quorum"}),(0,a.jsx)("th",{children:"Stream"})]})}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"delivery-limit"}),(0,a.jsx)("td",{}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"lesser value"})})}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"expires"}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"lesser value"})})}),(0,a.jsx)("td",{children:(0,a.jsxs)("ul",{children:[(0,a.jsx)("li",{children:"lesser value of the two policies"}),(0,a.jsx)("li",{children:"policy precedence over queue arguments"})]})}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"max-in-memory-bytes"}),(0,a.jsx)("td",{}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"lesser value"})})}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"max-in-memory-length"}),(0,a.jsx)("td",{}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"lesser value"})})}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"max-length"}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"lesser value"})})}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"lesser value"})})}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"max-length-bytes"}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"lesser value"})})}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"lesser value"})})}),(0,a.jsx)("td",{children:(0,a.jsxs)("ul",{children:[(0,a.jsx)("li",{children:"lesser value of the two policies"}),(0,a.jsx)("li",{children:"policy precedence over queue arguments"})]})})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"message-ttl"}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"lesser value"})})}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"lesser value"})})}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"overflow"}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"operator policy value"})})}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"operator policy value"})})}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"queue-version"}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"operator policy value"})})}),(0,a.jsx)("td",{}),(0,a.jsx)("td",{})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"target-group-size"}),(0,a.jsx)("td",{}),(0,a.jsx)("td",{children:(0,a.jsx)("ul",{children:(0,a.jsx)("li",{children:"greater value"})})}),(0,a.jsx)("td",{})]})]})]}),"\n",(0,a.jsxs)(i.p,{children:["When the same key is provided by both ",(0,a.jsxs)(i.a,{href:"./queues#optional-arguments",children:["client-provided ",(0,a.jsx)(i.code,{children:"x-arguments"})]})," and by a user policy,\nthe former take precedence.\nThe exception to this rule are all stream configuration settings as well as ",(0,a.jsx)(i.code,{children:"(x-)overflow"})," for quorum queues where the policy takes precedence."]}),"\n",(0,a.jsx)(i.p,{children:"However, if an operator policy is also used, that will take precedence over the client-provided\narguments, too. Operator policies are a protection mechanism and override client-provided values\nand user policy values."}),"\n",(0,a.jsx)(i.p,{children:"Use operator policies to introduce guardrails for application-controlled parameters related\nto resource use (e.g. peak disk space usage)."}),"\n",(0,a.jsx)(i.h3,{id:"operator-policy-definition",children:"Defining Operator Policies"}),"\n",(0,a.jsxs)(i.p,{children:["Operator policies are defined in a way very similar to regular (user) policies.\nWhen ",(0,a.jsx)(i.co
1de,{children:"rabbitmqctl"})," is used, the command name is ",(0,a.jsx)(i.code,{children:"set_operator_policy"}),"\ninstead of ",(0,a.jsx)(i.code,{children:"set_policy"}),". In the HTTP API, ",(0,a.jsx)(i.code,{children:"/api/policies/"})," in request path\nbecomes ",(0,a.jsx)(i.code,{children:"/api/operator-policies/"}),":"]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"bash",label:"rabbitmqctl with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqctl set_operator_policy transient-queue-ttl \\\n    "^amq\\." \'{"expires":1800000}\' \\\n    --priority 1 \\\n    --apply-to queues\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:"rabbitmqadmin operator_policies declare \\\n    --name 'transient-queue-ttl' \\\n    --apply-to 'queues' \\\n    --definition '{\"expires\":1800000}' \\\n    --pattern '^amq\\.' \\\n    --priority 1\n"})})}),(0,a.jsx)(s.A,{value:"PowerShell",label:"rabbitmqctl.bat with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqctl.bat set_operator_policy transient-queue-ttl ^\n    "^amq\\." "{""expires"": 1800000}" ^\n    --priority 1 ^\n    --apply-to queues\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqadmin.exe operator_policies declare ^\n    --name "transient-queue-ttl" ^\n    --apply-to "queues" ^\n    --definition "{""expires"": 1800000}" ^\n    --pattern "^amq\\." ^\n    --priority 1\n'})})}),(0,a.jsx)(s.A,{value:"HTTP API",label:"HTTP API",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-ini",children:'PUT /api/operator-policies/%2f/transient-queue-ttl\n                {"pattern": "^amq\\.",\n                 "definition": {"expires": 1800000},\n                 "priority": 1,\n                 "apply-to": "queues"}\n'})})}),(0,a.jsx)(s.A,{value:"Management UI",label:"Management UI",children:(0,a.jsxs)("ol",{children:[(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:["Navigate to ",(0,a.jsx)(i.code,{children:"Admin"})," > ",(0,a.jsx)(i.code,{children:"Policies"})," > ",(0,a.jsx)(i.code,{children:"Add / update an operator     policy"}),"."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:['Enter queue name ("transient-queue-ttl" in this example) next to Name, a pattern ("^amq." in this example) next to\n',(0,a.jsx)(i.code,{children:"Pattern"}),", and select what kind of entities (queues in this example) the policy should apply to using the ",(0,a.jsx)(i.code,{children:"Apply to"}),"\ndrop down."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:['Enter "expires" = 1800000 in the first line next to\n',(0,a.jsx)(i.code,{children:"Policy"}),"."]})}),(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:["Click ",(0,a.jsx)(i.code,{children:"Add policy"}),"."]})})]})})]}),"\n",(0,a.jsx)(i.admonition,{type:"danger",children:(0,a.jsxs)(i.p,{children:["When multiple policies match an entity and they all have equal priorities, the effective one\nwill be chosen undeterministically. ",(0,a.jsx)(i.strong,{children:"Such cases should be avoided"})," by paying attention\nto what priorities various policies use."]})}),"\n",(0,a.jsx)(i.h3,{id:"disable-operator-policy-changes",children:"How to Disable Operator Policy Changes"}),"\n",(0,a.jsx)(i.p,{children:"Modification of operator policies via the HTTP API and Web UI can be disabled\nin configuration. This makes operator policies read-only for all users via the\nHTTP API and Web UI."}),"\n",(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-ini",children:"management.restrictions.operator_policy_changes.disabled = true\n"})}),"\n",(0,a.jsx)(i.h3,{id:"default-operator-policies",children:"Pre-configuring Default Operator Policies for New Virtual Hosts"}),"\n",(0,a.jsxs)(i.p,{children:["Operator policies can be pre-configured in ",(0,a.jsx)(i.co
1de,{children:"rabbitmq.conf"})," for groups of virtual hosts whose names match a pattern.\nThis is useful when virtual hosts are created dynamically (e.g. on demand)\nbut must have consistent ",(0,a.jsx)(i.a,{href:"./limits",children:"guardrails"}),"."]}),"\n",(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-ini",children:'## When a new virtual host with a name matching ^prod-.* is created,\n## an operator policy named \'limits` will be added to it automatically.\n\n## In this example, "limits" is the operator policy name.\ndefault_policies.operator.limits.vhost_pattern = ^prod-.*\ndefault_policies.operator.limits.queue_pattern = .*\ndefault_policies.operator.limits.apply_to = queues\ndefault_policies.operator.limits.max_length = 10000\ndefault_policies.operator.limits.message_ttl = 86400000\n'})}),"\n",(0,a.jsx)(i.h2,{id:"operator-policy-updating",children:"Updating Operator Policies"}),"\n",(0,a.jsx)(i.admonition,{type:"tip",children:(0,a.jsxs)(i.p,{children:["Operator policies can be modified in a number of ways, very similarly\nto ",(0,a.jsx)(i.a,{href:"#updating",children:"regular policies"}),"."]})}),"\n",(0,a.jsx)(i.p,{children:"An operator policy can be updated by re-declaring it with a different definition, priority, and so on.\nThis requires the operator to have a full policy definition."}),"\n",(0,a.jsxs)(i.p,{children:["Alternatively, ",(0,a.jsxs)(i.a,{href:"./management-cli",children:[(0,a.jsx)(i.code,{children:"rabbitmqadmin"})," v2"]})," provides commands that can modify\noperator policy definitions."]}),"\n",(0,a.jsx)(i.h3,{id:"operator-policy-redefining",children:"Operator Policy Redefinition"}),"\n",(0,a.jsxs)(i.p,{children:["If a full policy definition is known, ",(0,a.jsx)(i.a,{href:"#operator-policy-definition",children:"redefining"})," a policy with an updated definition\nand (optionally) a new priority but the same original name will update it."]}),"\n",(0,a.jsx)(i.admonition,{type:"important",children:(0,a.jsx)(i.p,{children:"The effects of new settings on queues, streams and exchanges will take a moment to become effective,\nin particular for clusters with a large number of entites (say, thousands)."})}),"\n",(0,a.jsx)(i.h3,{id:"operator-policy-deleting-keys",children:"Deleting Operator Policy Definition Keys"}),"\n",(0,a.jsxs)(i.p,{children:["To delete one or multiple keys from a policy definition, use ",(0,a.jsx)(i.a,{href:"./management-cli",children:(0,a.jsx)(i.code,{children:"rabbitmqadmin policies delete_definition_keys"})}),":"]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'# removes all keys related to classic queue mirroring (that feature was removed in RabbitMQ 4.x)\n# from the definition of an operator policy named "cq.policies.1" in virtual host vh-1\nrabbitmqadmin --vhost "vh-1" operator_policies delete_definition_keys \\\n    --name "cq.op-policies.1" \\\n    --definition-keys "ha-mode,ha-params,ha-promote-on-shutdown,ha-promote-on-failure,ha-sync-mode,ha-sync-batch-size"\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'# removes all keys related to classic queue mirroring (that feature was removed in RabbitMQ 4.x)\n# from the definition of an operator policy named "cq.policies.1" in virtual host vh-1\nrabbitmqadmin.exe --vhost "vh-1" operator_policies delete_definition_keys ^\n    --name "cq.op-policies.1" ^\n    --definition-keys "ha-mode,ha-params,ha-promote-on-shutdown,ha-promote-on-failure,ha-sync-mode,ha-sync-batch-size"\n'})})})]}),"\n",(0,a.jsxs)(i.p,{children:["The ",(0,a.jsx)(i.code,{children:"--definitions-keys"})," parameter accepts a single definition key or a command-separated list of keys."]}),"\n",(0,a.jsxs)(i.p,{children:["To perform the same operation across all policies in a virtual host, use ",(0,a.jsx)(i.a,{href:"./management-cli",children:(0,a.jsx)(i.co
1de,{children:"rabbitmqadmin operator_policies delete_definition_keys_from_all_in"})}),":"]}),"\n",(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'# removes all keys related to classic queue mirroring (that feature was removed in RabbitMQ 4.x)\n# from all operator policy definitions in virtual host vh-1\nrabbitmqadmin --vhost "vh-1" operator_policies delete_definition_keys_from_all_in --definition-keys "ha-mode,ha-params,ha-promote-on-shutdown,ha-promote-on-failure,ha-sync-mode,ha-sync-batch-size"\n'})}),"\n",(0,a.jsx)(i.h3,{id:"operator-policy-patching",children:"Partially Updating Operator Policy Definition"}),"\n",(0,a.jsxs)(i.p,{children:[(0,a.jsx)(i.a,{href:"./management-cli",children:(0,a.jsx)(i.code,{children:"rabbitmqadmin operator_policies patch"})})," is a command that can update a policy\nusing a partial definition, for example, to add a ",(0,a.jsxs)(i.a,{href:"./maxlength/",children:[(0,a.jsx)(i.code,{children:"max-length"})," key"]})," to an existing\npolicy:"]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqadmin operator_policies patch --name "cq.op-pol.1" --definition \'{"max-length": 1000000}\'\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqadmin.exe operator_policies patch --name "cq.op-pol.1" --definition "{""max-length"": 1000000}"\n'})})})]}),"\n",(0,a.jsxs)(i.p,{children:["The new ",(0,a.jsx)(i.code,{children:"--definition"})," object will be merged into the existing policy definition."]}),"\n",(0,a.jsxs)(i.p,{children:["In the following example, an existing operator policy named ",(0,a.jsx)(i.code,{children:"queues.op-pol.1"})," in the default virtual host (",(0,a.jsx)(i.code,{children:"/"}),")\nis updated to set a ",(0,a.jsxs)(i.a,{href:"./ttl",children:[(0,a.jsx)(i.code,{children:"message-ttl"})," key"]})," on all the matched queues,\nwithout affecting the rest of the policy definitions:"]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqadmin operator_policies patch --name "queues.op-pol.1" --definition \'{"message-ttl": 3600000}\'\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqadmin.exe operator_policies patch --name "queues.op-pol.1" --definition "{""message-ttl"": 3600000}"\n'})})})]}),"\n",(0,a.jsx)(i.h2,{id:"operator-policy-deleting",children:"Deleting an Operator Policy"}),"\n",(0,a.jsxs)(i.p,{children:["An operator policy can be deleted using ",(0,a.jsx)(i.code,{children:"rabbitmqctl clear_operator_policy"})," or ",(0,a.jsx)(i.code,{children:"rabbitmqadmin operator_policies delete"}),"."]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"bash",label:"rabbitmqctl with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqctl clear_operator_policy --vhost "vh.1" "policy.name"\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqadmin --vhost "vh.1" operator_policies delete --name "policy.name"\n'})})}),(0,a.jsx)(s.A,{value:"PowerShell",label:"rabbitmqctl with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqctl.bat clear_operator_policy --vhost "vh.1" "policy.name"\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqadmin.exe --vhost "vh.
11" operator_policies delete --name "policy.name"\n'})})}),(0,a.jsx)(s.A,{value:"HTTP API",label:"HTTP API",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-ini",children:"DELETE /api/operator-policies/vh.1/policy.name\n"})})}),(0,a.jsx)(s.A,{value:"Management UI",label:"Management UI",children:(0,a.jsxs)("ol",{children:[(0,a.jsx)("li",{children:(0,a.jsxs)(i.p,{children:["Navigate to ",(0,a.jsx)(i.code,{children:"Admin"})," > ",(0,a.jsx)(i.code,{children:"Policies"})," > Locate the operator policy to delete"]})}),(0,a.jsx)("li",{children:(0,a.jsx)(i.p,{children:'Click "Clear" next to the operator policy to delete it'})})]})})]}),"\n",(0,a.jsx)(i.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,a.jsx)(i.h3,{id:"multiple-policies-have-conflicting-priorities",children:"Multiple Policies Have Conflicting Priorities"}),"\n",(0,a.jsxs)(i.p,{children:[(0,a.jsxs)(i.a,{href:"./management-cli",children:[(0,a.jsx)(i.code,{children:"rabbitmqadmin"})," v2"]})," can list policies with conflicting priorities\nin a specific virtual host or across all virtual hosts:"]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsxs)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",default:!0,children:[(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'# lists policies with conflicting priorities in a specific virtual host\nrabbitmqadmin --vhost "target.vhost" policies list_conflicting_in\n'})}),(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:"# lists policies with conflicting priorities across all virtual hosts\nrabbitmqadmin policies list_conflicting\n"})})]}),(0,a.jsxs)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:[(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'# lists policies with conflicting priorities in a specific virtual host\nrabbitmqadmin.exe --vhost "target.vhost" policies list_conflicting_in\n'})}),(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:"# lists policies with conflicting priorities across all virtual hosts\nrabbitmqadmin.exe policies list_conflicting\n"})})]})]}),"\n",(0,a.jsx)(i.p,{children:"Alternatively, list all policies in a virtual host and look for equal priorities manually:"}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"bash",label:"rabbitmqctl with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqctl --vhost "target.vhost" list_policies --formatter=pretty_table\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqadmin --vhost "target.vhost" policies list_in\n'})})}),(0,a.jsx)(s.A,{value:"PowerShell",label:"rabbitmqctl with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqctl.bat --vhost "target.vhost" list_policies --formatter=pretty_table\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqadmin.exe --vhost "target.vhost" policies list_in\n'})})})]}),"\n",(0,a.jsxs)(i.p,{children:["To narrow down which policies affect a specific object, use ",(0,a.jsx)(i.code,{children:"list_matching_object"}),":"]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqadmin --vhost "target.vhost" policies list_matching_object \\\n    --name "a.queue" \\\n    --type "queues"\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqadmin.exe --vhost "target.vhost" policies list_matching_object ^\n    --name "a.queue" ^\n    --type "queues"\n'})})})]}),"\n",(0,a.jsx)(i.p,{children:"Look for any and all policies that have equal priorities. Only one of them will apply\nto a matching object (queue, stream, exchange), and the selection should be\nconsidered non-deterministic (random)."}
1),"\n",(0,a.jsx)(i.h3,{id:"policy-pattern-or-target-type-does-not-match-objects-name-or-type",children:"Policy Pattern or Target Type Does Not Match Object's Name or Type"}),"\n",(0,a.jsxs)(i.p,{children:["To verify this hypothesis, list the policies that\nmatch the object (e.g. queue) in question using ",(0,a.jsxs)(i.a,{href:"./management-cli",children:[(0,a.jsx)(i.code,{children:"rabbitmqadmin"})," v2"]}),"."]}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'# lists all policies that match a queue named "a.queue" in a virtual host named "target.vhost"\nrabbitmqadmin --vhost "target.vhost" policies list_matching_object \\\n    --name "a.queue" \\\n    --type "queues"\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'# lists all policies that match a queue named "a.queue" in a virtual host named "target.vhost"\nrabbitmqadmin.exe --vhost "target.vhost" policies list_matching_object ^\n    --name "a.queue" ^\n    --type "queues"\n'})})})]}),"\n",(0,a.jsx)(i.p,{children:"If the results are empty, this means that no policies in the target virtual host\nhave matched the target object (queue, stream, exchange)."}),"\n",(0,a.jsx)(i.h3,{id:"policy-declared-in-the-wrong-virtual-host",children:"Policy Declared in the Wrong Virtual Host"}),"\n",(0,a.jsx)(i.p,{children:"Policies are virtual host-scoped, that is, belong to a particular virtual host and only\napply to the objects (queues, streams, exchanges) in that virtual host."}),"\n",(0,a.jsx)(i.p,{children:"A policy can be declared in the default virtual host by mistake.\nTo verify this hypothesis, list only the policies in that virtual host."}),"\n",(0,a.jsxs)(r.A,{groupId:"examples",children:[(0,a.jsx)(s.A,{value:"bash",label:"rabbitmqctl with bash",default:!0,children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqctl --vhost "target.vhost" list_policies --formatter=pretty_table\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin",label:"rabbitmqadmin with bash",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-bash",children:'rabbitmqadmin --vhost "target.vhost" policies list_in\n'})})}),(0,a.jsx)(s.A,{value:"PowerShell",label:"rabbitmqctl with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqctl.bat --vhost "target.vhost" list_policies --formatter=pretty_table\n'})})}),(0,a.jsx)(s.A,{value:"rabbitmqadmin-PowerShell",label:"rabbitmqadmin with PowerShell",children:(0,a.jsx)(i.pre,{children:(0,a.jsx)(i.code,{className:"language-PowerShell",children:'rabbitmqadmin.exe --vhost "target.vhost" policies list_in\n'})})})]}),"\n",(0,a.jsx)(i.p,{children:"If the results are empty, this means that there are no policies defined in the target virtual host."})]})}function u(e={}){let{wrapper:i}={...(0,t.R)(),...e.components};return i?(0,a.jsx)(i,{...e,children:(0,a.jsx)(p,{...e})}):p(e)}},57250(e,i,n){n.d(i,{A:()=>s});var l=n(74848);n(96540);var a=n(34164),t=n(57663);function r({children:e,className:i,hidden:n}){return(0,l.jsx)("div",{role:"tabpanel",className:(0,a.A)("tabItem_Ymn6",i),hidden:n,children:e})}function s({children:e,className:i,value:n}){let{selectedValue:a,lazy:o}=(0,t.uc)(),c=n===a;return!c&&o?null:(0,l.jsx)(r,{className:i,hidden:!c,children:e})}},50773(e,i,n){n.d(i,{A:()=>p});var l=n(74848);n(96540);var a=n(34164),t=n(88287),r=n(57663),s=n(28584),o=n(19863);function c({className:e}){let{selectedValue:i,selectValue:n,tabValues:t,block:o}=(0,r.uc)(),d=[],{blockElementScrollPositionUntilNextRender:h}=(0,s.a_)(),p=e=>{let l=e.currentTarget,a=t[d.indexOf(l)].value;a!==i&&(h(l),n(a))},u=e=>{let i=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{let n=d.indexOf(e.currentTarget)+1;i=d[n]??d[0];break}case"ArrowLeft":{let n=d.indexOf(e.currentTarget)-1;i=d[n]??d[d.length-1]}}i?.focus()};return(0,l.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":o},e),children:t.map(({value:e,label:n,attributes:t})=>(0,l.jsx)("li",{role:"tab",tabIndex:i===e?0:-1,"aria-selected":i===e,ref:e=>{d.push(e)},onKeyDown:u,onClick:p,...t,className:(0,a.A)("tabs__item","tabItem_LNqP",t?.className,{"tabs__item--active":i===e}),children:n??e},e))})}function d({children:e}){return(0,l.jsx)("div",{className:"margin-top--md",children:e})}function h({className:e,children:i}){return(0,l.jsxs)("div",{className:(0,a.A)(t.G.tabs.container,"tabs-container","tabList__CuJ"),children:[(0,l.jsx)(c,{className:e}),(0,l.jsx)(d,{children:i})]})}function p(e){let i=(0,o.A)(),n=(0,r.OC)(e);return(0,l.jsx)(r.O_,{value:n,children:(0,l.jsx)(h,{className:e.className,children:(0,r.vT)(e.children)})},String(i))}},57663(e,i,n){n.d(i,{OC:()=>p,O_:()=>x,uc:()=>m,vT:()=>d});var l=n(74848),a=n(96540),t=n(56347),r=n(99989),s=n(96629),o=n(80618),c=n(41367);function d(e){return a.Children.toArray(e).filter(e=>"\n"!==e)}function h({value:e,tabValues:i}){return i.some(i=>i.value===e)}function p(e){let i,{defaultValue:n,queryString:l=!1,groupId:d}=e,p=function(e){let{values:i,children:n}=e;return(0,a.useMemo)(()=>{let e=i??a.Children.toArray(n).flatMap(e=>{if(!e)return[];if((0,a.isValidElement)(e)&&function(e){let{props:i}=e;return!!i&&"object"==typeof i&&"value"in i}(e))return[e];
1let i="string"==typeof e.type?e.type:e.type.name;throw Error(`Docusaurus error: Bad <Tabs> child <${i}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.
2If you do not want to pass on a "value" prop to the direct children of <Tabs>, you can also pass an explicit <Tabs values={...}> prop.`)}).map(({props:{value:e,label:i,attributes:n,default:l}})=>({value:e,label:i,attributes:n,default:l})),l=(0,o.XI)(e,(e,i)=>e.value===i.value);if(l.length>0)throw Error(`Docusaurus error: Duplicate values "${l.map(e=>`'${e.value}'`).join(", ")}" found in <Tabs>. Every value needs to be unique.`);return e},[i,n])}(e),[u,m]=(0,a.useState)(()=>(function({defaultValue:e,tabValues:i}){if(0===i.length)throw Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!h({value:e,tabValues:i}))throw Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${i.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}let n=i.find(e=>e.default)??i[0];if(!n)throw Error("Unexpected error: 0 tabValues");return n.value})({defaultValue:n,tabValues:p})),[x,j]=function({queryString:e=!1,groupId:i}){let n=(0,t.W6)(),l=function({queryString:e=!1,groupId:i}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!i)throw Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return i??null}({queryString:e,groupId:i});return[(0,s.aZ)(l),(0,a.useCallback)(e=>{if(!l)return;let i=new URLSearchParams(n.location.search);i.set(l,e),n.replace({...n.location,search:i.toString()})},[l,n])]}({queryString:l,groupId:d}),[b,f]=function({groupId:e}){let i=e?`docusaurus.tab.${e}`:null,[n,l]=(0,c.Dv)(i);return[n,(0,a.useCallback)(e=>{i&&l.set(e)},[i,l])]}({groupId:d}),g=h({value:i=x??b,tabValues:p})?i:null;return(0,r.A)(()=>{g&&m(g)},[g]),{selectedValue:u,selectValue:(0,a.useCallback)(e=>{if(!h({value:e,tabValues:p}))throw Error(`Can't select invalid tab value=${e}`);m(e),j(e),f(e)},[j,f,p]),tabValues:p,lazy:e.lazy??!1,block:e.block??!1}}let u=(0,a.createContext)(null);function m(){let e=a.useContext(u);if(!e)throw Error("useTabsContext() must be used within a Tabs component");return e}function x(e){return(0,l.jsx)(u.Provider,{value:e.value,children:e.children})}},28453(e,i,n){n.d(i,{R:()=>r,x:()=>s});var l=n(96540);let a={},t=l.createContext(a);function r(e){let i=l.useContext(t);return l.useMemo(function(){return"function"==typeof e?e(i):{...i,...e}},[i,e])}function s(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),l.createElement(t.Provider,{value:i},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.