{"id":20476678,"url":"https://github.com/rabbitmq/rabbitmqadmin-ng","last_synced_at":"2026-02-03T05:23:49.663Z","repository":{"id":172797742,"uuid":"649798989","full_name":"rabbitmq/rabbitmqadmin-ng","owner":"rabbitmq","description":"A command line tool for RabbitMQ that uses the HTTP API","archived":false,"fork":false,"pushed_at":"2025-07-04T17:29:24.000Z","size":1702,"stargazers_count":25,"open_issues_count":3,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-07-06T23:12:22.682Z","etag":null,"topics":["cli","http","rabbitmq"],"latest_commit_sha":null,"homepage":"https://www.rabbitmq.com/docs/management-cli","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rabbitmq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-05T16:56:24.000Z","updated_at":"2025-07-06T12:03:19.000Z","dependencies_parsed_at":"2023-08-16T18:01:49.568Z","dependency_job_id":"b75a4fb2-0491-4cb1-ad14-adf7c2bb1331","html_url":"https://github.com/rabbitmq/rabbitmqadmin-ng","commit_stats":null,"previous_names":["michaelklishin/rabbitmqadmin-rs","rabbitmq/rabbitmqadmin-ng"],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/rabbitmq/rabbitmqadmin-ng","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Frabbitmqadmin-ng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Frabbitmqadmin-ng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Frabbitmqadmin-ng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Frabbitmqadmin-ng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rabbitmq","download_url":"https://codeload.github.com/rabbitmq/rabbitmqadmin-ng/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbitmq%2Frabbitmqadmin-ng/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265155671,"owners_count":23719560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","http","rabbitmq"],"created_at":"2024-11-15T15:22:13.893Z","updated_at":"2026-02-03T05:23:49.655Z","avatar_url":"https://github.com/rabbitmq.png","language":"Rust","readme":"# rabbitmqadmin v2: a Modern Command Line Client for the [RabbitMQ HTTP API](https://www.rabbitmq.com/docs/http-api-reference)\n\n`rabbitmqadmin` v2 is a major revision of `rabbitmqadmin`, one of the [RabbitMQ CLI tools](https://www.rabbitmq.com/docs/cli)\nthat target the [HTTP API](https://www.rabbitmq.com/docs/http-api-reference).\n\nIf you are migrating from the original `rabbitqadmin`, please see [Breaking or Potentially Breaking Changes](#breaking-or-potentially-breaking-changes)\nto learn about the breaking changes in the command line interface.\n\nThe general \"shape and feel\" of the interface is still very similar to `rabbitmqadmin` v1. However, this generation\nis significantly more powerful, in particular, when it comes to [Blue-Green Deployment upgrades and migrations](https://www.rabbitmq.com/blog/2025/07/29/latest-benefits-of-rmq-and-migrating-to-qq-along-the-way)\nfrom RabbitMQ 3.13.x to 4.x.\n\n\n## Supported RabbitMQ Series\n\n`rabbitmqadmin` v2 targets\n\n * Open source RabbitMQ `4.x`\n * Open source RabbitMQ `3.13.x` (specifically for the command groups and commands related to upgrades)\n * Tanzu RabbitMQ `4.x`\n * Tanzu RabbitMQ `3.13.x`\n\n\n## Getting Started\n\n### Installation\n\n#### Binary Releases\n\nTo download a binary build, see [Releases](https://github.com/rabbitmq/rabbitmqadmin-ng/releases).\n\n#### Building from Source with `cargo install`\n\nOn platforms not covered by the binary builds, `rabbitmqadmin` v2 can be installed with [Cargo](https://doc.rust-lang.org/cargo/commands/cargo-install.html):\n\n```shell\ncargo install rabbitmqadmin\n```\n\n### Documentation\n\nFor usage documentation, see the [dedicated RabbitMQ doc guide](https://www.rabbitmq.com/docs/management-cli) and/or [Usage](#usage) below.\n\n\n## Getting Help\n\nPlease use GitHub Discussions in this repository and [RabbitMQ community Discord server](https://rabbitmq.com/discord/).\n\n\n## Project Maturity\n\nThis version of `rabbitmqadmin` should be considered reasonably mature to be used.\n\nBefore migrating, please see [Breaking or Potentially Breaking Changes](#breaking-or-potentially-breaking-changes) to learn about a few breaking changes in the interface.\n\n\n## Usage\n\n### Explore Available Command Groups and Sub-commands\n\nTo explore what command groups are available, use\n\n```shell\nrabbitmqadmin help\n```\n\nwhich will output a list of command groups:\n\n```\nUsage: rabbitmqadmin [OPTIONS] \u003cCOMMAND\u003e\n\nCommands:\n  bindings             Operations on bindings\n  channels             Operations on channels\n  close                Closes connections\n  connections          Operations on connections\n  declare              Creates or declares objects\n  definitions          Operations on definitions (everything except for messages: virtual hosts, queues, streams, exchanges, bindings, users, etc)\n  delete               Deletes objects\n  deprecated_features  Operations on deprecated features\n  exchanges            Operations on exchanges\n  export               See 'definitions export'\n  feature_flags        Operations on feature flags\n  federation           Operations on federation upstreams and links\n  get                  Fetches message(s) from a queue or stream via polling. Only suitable for development and test environments.\n  global_parameters    Operations on global runtime parameters\n  health_check         Runs health checks\n  import               See 'definitions import'\n  list                 Lists objects\n  nodes                Node operations\n  operator_policies    Operations on operator policies\n  parameters           Operations on runtime parameters\n  passwords            Operations on passwords\n  permissions          Operations on user permissions\n  plugins              List enabled plugins\n  policies             Operations on policies\n  publish              Publishes (inefficiently) message(s) to a queue or a stream. Only suitable for development and test environments.\n  purge                Purges queues\n  queues               Operations on queues\n  rebalance            Rebalancing of leader replicas\n  show                 Overview, memory footprint breakdown, and more\n  shovels              Operations on shovels\n  streams              Operations on streams\n  tanzu                Tanzu RabbitMQ-specific commands\n  users                Operations on users\n  user_limits          Operations on per-user (resource) limits\n  vhosts               Virtual host operations\n  vhost_limits         Operations on virtual host (resource) limits\n  help                 Print this message or the help of the given subcommand(s)\n```\n\nTo explore commands in a specific group, use\n\n```shell\nrabbitmqadmin {group name} help\n```\n\n### Explore the CLI with `help`, `--help`\n\nTo learn about what command groups and specific commands are available, run\n\n``` shell\nrabbitmqadmin help\n```\n\nThis flag can be appended to a command or subcommand to get command-specific documentation:\n\n```shell\nrabbitmqadmin queues declare --help\n# =\u003e Declares a queue or a stream\n# =\u003e\n# =\u003e Usage: rabbitmqadmin queues declare [OPTIONS] --name \u003cname\u003e\n# =\u003e ...\n```\n\nAlternatively, the `help` subcommand can be given a command name. It's the equivalent\nof tagging on `--help` at the end of command name:\n\n```shell\nrabbitmqadmin queues help declare\n# =\u003e Declares a queue or a stream\n# =\u003e\n# =\u003e Usage: rabbitmqadmin queues declare [OPTIONS] --name \u003cname\u003e\n```\n\nMore specific examples are covered in the Examples section below.\n\n\n### Interactive vs. Use in Scripts\n\nLike the original version, `rabbitmqadmin` v2 is first and foremost built for interactive use\nby humans. Many commands will output formatted tables, for example:\n\n```shell\nrabbitmqadmin show overview\n```\n\nwill output a table that looks like this:\n\n```\n┌───────────────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────┐\n│ Overview                                                                                                                                                            │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ key                                                               │ value                                                                                           │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Product name                                                      │ RabbitMQ                                                                                        │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Product version                                                   │ 4.1.2                                                                                           │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ RabbitMQ version                                                  │ 4.1.2                                                                                           │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Erlang version                                                    │ 27.3.4                                                                                          │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Erlang details                                                    │ Erlang/OTP 27 [erts-15.2.5] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit] │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Connections (total)                                               │ 4                                                                                               │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ AMQP 0-9-1 channels (total)                                       │ 4                                                                                               │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Queues and streams (total)                                        │ 4                                                                                               │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Consumers (total)                                                 │ 4                                                                                               │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Messages (total)                                                  │ 222                                                                                             │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Messages ready for delivery (total)                               │ 2                                                                                               │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Messages delivered but unacknowledged by consumers (total)        │ 220                                                                                             │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Publishing (ingress) rate (global)                                │                                                                                                 │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Publishing confirm rate (global)                                  │                                                                                                 │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Consumer delivery (egress) rate (global)                          │                                                                                                 │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Consumer delivery in automatic acknowledgement mode rate (global) │                                                                                                 │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Consumer acknowledgement rate (global)                            │                                                                                                 │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Unroutable messages: returned-to-publisher rate (global)          │                                                                                                 │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Unroutable messages: dropped rate (global)                        │                                                                                                 │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Cluster tags                                                      │ \"az\": \"us-east-3\"                                                                               │\n│                                                                   │ \"environment\": \"production\"                                                                     │\n│                                                                   │ \"region\": \"us-east\"                                                                             │\n│                                                                   │                                                                                                 │\n├───────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤\n│ Node tags                                                         │ \"environment\": \"production\"                                                                     │\n│                                                                   │ \"instance\": \"xlarge.m3\"                                                                         │\n│                                                                   │                                                                                                 │\n└───────────────────────────────────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────┘\n```\n\nAs it is easy to observe, parsing such output in a script will be challenging.\n\nFor this reason, `rabbitmqadmin` v2 can render results in a way that would be much more friendly\nfor scripting if the `--non-interactive` flag is passed. It is a global flag so it must be\npassed before the command and subcommand name:\n\n```shell\nrabbitmqadmin --non-interactive show overview\n```\n\nThe output of the above command will not include any table borders and is much easier to parse\nas a result:\n\n```\nkey\nProduct name                                                      RabbitMQ\nProduct version                                                   4.1.2\nRabbitMQ version                                                  4.1.2\nErlang version                                                    27.3.4\nErlang details                                                    Erlang/OTP 27 [erts-15.2.7] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]\nConnections (total)                                               0\nAMQP 0-9-1 channels (total)                                       0\nQueues and streams (total)                                        3\nConsumers (total)                                                 0\nMessages (total)                                                  0\nMessages ready for delivery (total)                               0\nMessages delivered but unacknowledged by consumers (total)        0\nPublishing (ingress) rate (global)\nPublishing confirm rate (global)\nConsumer delivery (egress) rate (global)\nConsumer delivery in automatic acknowledgement mode rate (global)\nConsumer acknowledgement rate (global)\nUnroutable messages: returned-to-publisher rate (global)\nUnroutable messages: dropped rate (global)\nCluster tags                                                      \"az\": \"us-east-3\",\"environment\": \"production\",\"region\": \"us-east\",\nNode tags                                                         \"environment\": \"production\",\"instance\": \"xlarge.m3\",\n```\n\n### Retrieve Basic Node Information\n\n``` shell\nrabbitmqadmin show overview\n```\n\nwill display essential node information in tabular form.\n\n### Retrieve Connection, Queue/Stream, Channel Churn Information\n\nHelps assess connection, queue/stream, channel [churn metrics](https://rabbitmq.com/docs/connections#high-connection-churn) in the cluster.\n\n``` shell\nrabbitmqadmin show churn\n```\n\n### Display the HTTP API Endpoint\n\nTo verify the computed HTTP API endpoint URI (useful for troubleshooting):\n\n``` shell\nrabbitmqadmin show endpoint\n```\n\n### List Cluster Nodes\n\n``` shell\nrabbitmqadmin nodes list\n```\n\n### List Virtual Hosts\n\n``` shell\nrabbitmqadmin vhosts list\n```\n\n### List Users\n\n``` shell\nrabbitmqadmin users list\n```\n\n### List Queues\n\n``` shell\nrabbitmqadmin queues list\n```\n\n``` shell\nrabbitmqadmin --vhost \"monitoring\" queues list\n```\n\n``` shell\n# List queues with specific columns only\nrabbitmqadmin queues list --columns name,queue_type,message_count\n```\n\n### Show Queue Details\n\n``` shell\nrabbitmqadmin queues show --name \"events.incoming\"\n```\n\n``` shell\nrabbitmqadmin queues show --name \"orders.pending\" --columns name,queue_type,message_count\n```\n\n### List Exchanges\n\n``` shell\nrabbitmqadmin exchanges list\n```\n\n``` shell\nrabbitmqadmin --vhost \"events\" exchanges list\n```\n\n### List Bindings\n\n``` shell\nrabbitmqadmin bindings list\n```\n\n``` shell\nrabbitmqadmin --vhost \"events\" bindings list\n```\n\n### List Consumers\n\n``` shell\nrabbitmqadmin consumers list\n```\n\n``` shell\nrabbitmqadmin --vhost \"events\" consumers list\n```\n\n### Create a Virtual Host\n\n```shell\nrabbitmqadmin vhosts declare --name \"vh-789\" --default-queue-type \"quorum\" --description \"Used to reproduce issue #789\"\n```\n\n### Delete a Virtual Host\n\n```shell\nrabbitmqadmin vhosts delete --name \"vh-789\"\n```\n\n```shell\n# --idempotently means that 404 Not Found responses will not be  considered errors\nrabbitmqadmin vhosts delete --name \"vh-789\" --idempotently\n```\n\n### Enable Virtual Host Deletion Protection\n\n```shell\nrabbitmqadmin vhosts enable_deletion_protection --name \"production\"\n```\n\n### Disable Virtual Host Deletion Protection\n\n```shell\nrabbitmqadmin vhosts disable_deletion_protection --name \"production\"\n```\n\n### Declare a Queue\n\n```shell\nrabbitmqadmin --vhost \"events\" queues declare --name \"target.quorum.queue.name\" --type \"quorum\" --durable true\n```\n\n```shell\nrabbitmqadmin --vhost \"events\" queues declare --name \"target.stream.name\" --type \"stream\" --durable true\n```\n\n```shell\nrabbitmqadmin --vhost \"events\" queues declare --name \"target.classic.queue.name\" --type \"classic\" --durable true --auto-delete false\n```\n\n### Purge a queue\n\n```shell\nrabbitmqadmin --vhost \"events\" queues purge --name \"target.queue.name\"\n```\n\n### Delete a queue\n\n``` shell\nrabbitmqadmin --vhost \"events\" queues delete --name \"target.queue.name\"\n```\n\n``` shell\n# --idempotently means that 404 Not Found responses will not be  considered errors\nrabbitmqadmin --vhost \"events\" queues delete --name \"target.queue.name\" --idempotently\n```\n\n### Declare an Exchange\n\n```shell\nrabbitmqadmin --vhost \"events\" exchanges declare --name \"events.all_types.topic\" --type \"topic\" --durable true\n```\n\n```shell\nrabbitmqadmin --vhost \"events\" exchanges declare --name \"events.all_type.uncategorized\" --type \"fanout\" --durable true --auto-delete false\n```\n\n```shell\nrabbitmqadmin --vhost \"events\" exchanges declare --name \"local.random.c60bda92\" --type \"x-local-random\" --durable true\n```\n\n### Delete an exchange\n\n``` shell\nrabbitmqadmin --vhost \"events\" exchanges delete --name \"target.exchange.name\"\n```\n\n``` shell\n# --idempotently means that 404 Not Found responses will not be  considered errors\nrabbitmqadmin --vhost \"events\" exchanges delete --name \"target.exchange.name\" --idempotently\n```\n\n### Bind an Exchange to a Queue or Another Exchange\n\n```shell\nrabbitmqadmin --vhost \"events\" exchanges bind --source \"events.topic\" --destination-type \"queue\" --destination \"events.processing\" --routing-key \"user.created\"\n```\n\n```shell\nrabbitmqadmin --vhost \"events\" exchanges bind --source \"events.fanout\" --destination-type \"exchange\" --destination \"events.archived\" --routing-key \"\"\n```\n\n### Unbind an Exchange from a Queue or Another Exchange\n\n```shell\nrabbitmqadmin --vhost \"events\" exchanges unbind --source \"events.topic\" --destination-type \"queue\" --destination \"events.processing\" --routing-key \"user.created\"\n```\n\n```shell\nrabbitmqadmin --vhost \"events\" exchanges unbind --source \"events.fanout\" --destination-type \"exchange\" --destination \"events.archived\" --routing-key \"\"\n```\n\n### Inspect Node Memory Breakdown\n\nThere are two commands for reasoning about target [node's memory footprint](https://rabbitmq.com/docs/memory-use):\n\n```shell\n# displays a breakdown in bytes\nrabbitmqadmin show memory_breakdown_in_bytes --node 'rabbit@hostname'\n```\n\n```shell\n# displays a breakdown in percent\nrabbitmqadmin show memory_breakdown_in_percent --node 'rabbit@hostname'\n```\n\nExample output of `show memory_breakdown_in_percent`:\n\n```\n┌────────────────────────────────────────┬────────────┐\n│ key                                    │ percentage │\n├────────────────────────────────────────┼────────────┤\n│ total                                  │ 100%       │\n├────────────────────────────────────────┼────────────┤\n│ Binary heap                            │ 45.10%     │\n├────────────────────────────────────────┼────────────┤\n│ Allocated but unused                   │ 23.45%     │\n├────────────────────────────────────────┼────────────┤\n│ Quorum queue ETS tables                │ 23.05%     │\n├────────────────────────────────────────┼────────────┤\n│ Other processes                        │ 5.32%      │\n├────────────────────────────────────────┼────────────┤\n│ Other (used by the runtime)            │ 4.98%      │\n├────────────────────────────────────────┼────────────┤\n│ Code                                   │ 4.54%      │\n├────────────────────────────────────────┼────────────┤\n│ Client connections: others processes   │ 3.64%      │\n├────────────────────────────────────────┼────────────┤\n│ Management stats database              │ 3.48%      │\n├────────────────────────────────────────┼────────────┤\n│ Client connections: reader processes   │ 3.22%      │\n├────────────────────────────────────────┼────────────┤\n│ Plugins and their data                 │ 3.12%      │\n├────────────────────────────────────────┼────────────┤\n│ Other (ETS tables)                     │ 1.55%      │\n├────────────────────────────────────────┼────────────┤\n│ Metrics data                           │ 0.66%      │\n├────────────────────────────────────────┼────────────┤\n│ AMQP 0-9-1 channels                    │ 0.40%      │\n├────────────────────────────────────────┼────────────┤\n│ Message store indices                  │ 0.27%      │\n├────────────────────────────────────────┼────────────┤\n│ Atom table                             │ 0.24%      │\n├────────────────────────────────────────┼────────────┤\n│ Client connections: writer processes   │ 0.19%      │\n├────────────────────────────────────────┼────────────┤\n│ Quorum queue replica processes         │ 0.10%      │\n├────────────────────────────────────────┼────────────┤\n│ Stream replica processes               │ 0.07%      │\n├────────────────────────────────────────┼────────────┤\n│ Mnesia                                 │ 0.02%      │\n├────────────────────────────────────────┼────────────┤\n│ Metadata store                         │ 0.02%      │\n├────────────────────────────────────────┼────────────┤\n│ Stream coordinator processes           │ 0.02%      │\n├────────────────────────────────────────┼────────────┤\n│ Classic queue processes                │ 0.00%      │\n├────────────────────────────────────────┼────────────┤\n│ Metadata store ETS tables              │ 0.00%      │\n├────────────────────────────────────────┼────────────┤\n│ Stream replica reader processes        │ 0.00%      │\n├────────────────────────────────────────┼────────────┤\n│ Reserved by the kernel but unallocated │ 0.00%      │\n└────────────────────────────────────────┴────────────┘\n```\n\nNote that there are [two different supported strategies](https://rabbitmq.com/docs/memory-use#strategies)\nfor computing memory footprint of a node. `rabbitmqadmin` will use the greater value\nfor 100% when computing the relative share in percent for each category.\n\nOther factors that can affect the precision of percentage values reported\nare [runtime allocator](https://rabbitmq.com/docs/memory-use#preallocated-memory)\nbehavior nuances and the [kernel page cache](https://rabbitmq.com/docs/memory-use#page-cache).\n\n### List feature flags and their state\n\n```shell\nrabbitmqadmin feature_flags list\n```\n\n### Enable a feature flag\n\n```shell\nrabbitmqadmin feature_flags enable --name rabbitmq_4.0.0\n```\n\n### Enable all stable feature flags\n\n```shell\nrabbitmqadmin feature_flags enable_all\n```\n\n### List deprecated features in use in the cluster\n\n```shell\nrabbitmqadmin deprecated_features list_used\n```\n\n### List all deprecated features\n\n```shell\nrabbitmqadmin deprecated_features list\n```\n\n### Export Definitions\n\nTo export [definitions](https://www.rabbitmq.com/docs/definitions) to standard output, use `definitions export --stdout`:\n\n```shell\nrabbitmqadmin definitions export --stdout\n```\n\nTo export definitions to a file, use `definitions export --file /path/to/definitions.file.json`:\n\n```shell\nrabbitmqadmin definitions export --file /path/to/definitions.file.json\n```\n\n### Export and Transform Definitions\n\n`definitions export` can transform the exported JSON definitions file it gets from the\ntarget node. This is done by applying one or more transformations to the exported\nJSON file.\n\nThis can be useful to remove classic queue mirroring-related keys (such as `ha-mode`) from a definitions\nset originating from a 3.13.x node, or to obfuscate usernames and passwords, or exclude certain definitions file\nsections entirely.\n\nTo specify what transformations should be applied, use the `--transformations` options,\nwhich takes a comma-separated list of  supported operation names.\n\nThe following table explains what transformations are available and what they do:\n\n| Transformation name            | Description                                                  |\n|--------------------------------|--------------------------------------------------------------|\n| `strip_cmq_keys_from_policies` | Deletes all classic queue mirroring-related keys (such as `ha-mode`) from all exported policies.\u003cbr\u003e\u003cbr\u003eMust be followed by `drop_empty_policies` to strip off the policies whose definition has become empty (and thus invalid at import time) after the removal of all classic queue mirroring-related keys |\n| `drop_empty_policies`          | Should be used after `strip_cmq_keys_from_policies` to strip off the policies whose definition has become empty (and thus invalid at import time) after the removal of all classic queue mirroring-related keys |\n| `obfuscate_usernames`          | Replaces usernames and passwords with dummy values.\u003cbr\u003e\u003cbr\u003eFor usernames the values used are: `obfuscated-username-1`, `obfuscated-username-2`, and so on.\u003cbr\u003e\u003cbr\u003eFor passwords the values generated are: `password-1`, `password-2`, and so forth.\u003cbr\u003e\u003cbr\u003eThis transformations updates both the users and the permissions sections, consistently |\n| `exclude_users`                | Removes all users from the result. Commonly used together with `exclude_permissions` |\n| `exclude_permissions`          | Removes all permissions from the result. Commonly used together with `exclude_users` |\n| `exclude_runtime_parameters`   | Removes all runtime parameters (including federation upstreams, shovels, WSR and SDS settings in Tanzu RabbitMQ) from the result |\n| `exclude_policies`             | Removes all policies from the result                         |\n| `no_op`                        | Does nothing. Can be used as the default in dynamically computed transformation lists, e.g. in scripts |\n\n#### Examples\n\nThe following command applies two transformations named `strip_cmq_keys_from_policies` and `drop_empty_policies`\nthat will strip all classic queue mirroring-related policy keys that RabbitMQ 3.13 nodes supported,\nthen removes the policies that did not have any keys left (ended up having an empty definition):\n\n```shell\n# strips classic mirrored queue-related policy keys from the exported definitions, then prints them\n# to the standard output stream\nrabbitmqadmin definitions export --stdout --transformations strip_cmq_keys_from_policies,drop_empty_policies\n```\n\nThe following example exports definitions without users and permissions:\n\n```shell\n# removes users and user permissions from the exported definitions, then prints them\n# to the standard output stream\nrabbitmqadmin definitions export --stdout --transformations exclude_users,exclude_permissions\n```\n\nTo export definitions with usernames replaced by dummy values (usernames: `obfuscated-username-1`, `obfuscated-username-2`, and so on;\npasswords: `password-1`, `password-2`, and so forth), use the `obfuscate_usernames` transformation:\n\n```shell\nrabbitmqadmin definitions export --file /path/to/definitions.file.json --transformations obfuscate_usernames\n```\n\n### Declare a Policy\n\n```shell\nrabbitmqadmin --vhost \"vh-1\" policies declare \\\n  --name \"policy-name-1\" \\\n  --pattern '^cq.1\\..+' \\\n  --apply-to \"queues\" \\\n  --priority 10 \\\n  --definition '{\"max-length\": 1000000}'\n```\n\n### Delete a Policy\n\n```shell\nrabbitmqadmin --vhost \"vh-1\" policies delete --name \"policy-name-1\"\n```\n\n### List All Policies\n\n```shell\nrabbitmqadmin policies list\n```\n\n### List Policies in A Virtual Host\n\n```shell\nrabbitmqadmin --vhost \"vh-1\" policies list_in\n```\n\n### List Policies Matching an Object\n\n```shell\nrabbitmqadmin --vhost \"vh-1\" policies list_matching_object --name \"cq.1\" --type \"queues\"\n\nrabbitmqadmin --vhost \"vh-1\" policies list_matching_object --name \"qq.1\" --type \"queues\"\n\nrabbitmqadmin --vhost \"vh-1\" policies list_matching_object --name \"topics.events\" --type \"exchanges\"\n```\n\n### Patch (Perform a Partial Update on) a Policy\n\n```shell\nrabbitmqadmin --vhost \"vh-1\" policies patch \\\n  --name \"policy-name-1\" \\\n  --definition '{\"max-length\": 7777777, \"max-length-bytes\": 3333333333}'\n```\n\n### Remove One Or More Policy Definition Keys\n\n```shell\nrabbitmqadmin policies delete_definition_keys \\\n  --name \"policy-name-2\" \\\n  --definition-keys max-length-bytes,max-length\n```\n\n### Declare an [Override Policy](https://www.rabbitmq.com/docs/policies#override)\n\n[Override policies](https://www.rabbitmq.com/docs/policies#override) are temporarily declared\npolicies that match the same objects as an existing policy but have a higher priority\nand a slightly different definition.\n\nThis is a potentially safer alternative to patching policies, say, during [Blue-Green deployment migrations](https://www.rabbitmq.com/docs/blue-green-upgrade).\n\nOverride policies are meant to be relatively short lived.\n\n```shell\nrabbitmqadmin --vhost \"vh-1\" policies declare_override \\\n  --name \"policy-name-1\" \\\n  --override-name \"tmp.overrides.policy-name-1\" \\\n  --definition '{\"federation-upstream-set\": \"all\"}'\n```\n\n### Declare a [Blanket Policy](https://www.rabbitmq.com/docs/policies#blanket)\n\nA [blanket policy](https://www.rabbitmq.com/docs/policies#blanket) is a policy with a negative priority that\nmatches all names. That is, it is a policy that matches everything not matched by other policies (that usually\nwill have positive priorities).\n\nBlanket policies are most useful in combination with override policies\ncovered above during [Blue-Green deployment migrations](https://www.rabbitmq.com/docs/blue-green-upgrade).\n\nBlanket policies are meant to be relatively short lived.\n\n```shell\nrabbitmqadmin --vhost \"vh-1\" policies declare_blanket \\\n  --name \"blanket-queuues\" \\\n  --apply-to \"queues\" \\\n  --definition '{\"federation-upstream-set\": \"all\"}'\n```\n\n### Update a Policy Definition Key\n\n```shell\nrabbitmqadmin --vhost \"vh-1\" policies update_definition \\\n  --name \"policy-name-1\" \\\n  --definition-key \"max-length\" \\\n  --new-value \"5000000\"\n```\n\n### Update a Definition Key in All Policies in a Virtual Host\n\n```shell\nrabbitmqadmin --vhost \"vh-1\" policies update_definitions_of_all_in \\\n  --definition-key \"max-length\" \\\n  --new-value \"5000000\"\n```\n\n### Update a Definition Key in All Policies in the Cluster\n\n```shell\nrabbitmqadmin policies update_definitions_of_all \\\n  --definition-key \"max-length\" \\\n  --new-value \"5000000\"\n```\n\n### Delete Definition Keys from All Policies in a Virtual Host\n\n```shell\nrabbitmqadmin --vhost \"vh-1\" policies delete_definition_keys_from_all_in \\\n  --definition-keys max-length,max-length-bytes\n```\n\n### Delete Definition Keys from All Policies in the Cluster\n\n```shell\nrabbitmqadmin policies delete_definition_keys_from_all \\\n  --definition-keys max-length,max-length-bytes\n```\n\n\n### Import Definitions\n\nTo import definitions from the standard input, use `definitions import --stdin`:\n\n```shell\ncat /path/to/definitions.file.json | rabbitmqadmin definitions import --stdin\n```\n\nTo import definitions from a file, use `definitions import --file /path/to/definitions.file.json`:\n\n```shell\nrabbitmqadmin definitions import --file /path/to/definitions.file.json\n```\n\n### Export Definitions from a Specific Virtual Host\n\n```shell\nrabbitmqadmin --vhost \"events\" definitions export_from_vhost --stdout\n```\n\n```shell\nrabbitmqadmin --vhost \"events\" definitions export_from_vhost --file /path/to/vhost-definitions.json\n```\n\n### Import Virtual Host-specific Definitions\n\n```shell\nrabbitmqadmin --vhost \"events\" definitions import_into_vhost --file /path/to/vhost-definitions.json\n```\n\n### Declare an AMQP 0-9-1 Shovel\n\nTo declare a [dynamic shovel](https://www.rabbitmq.com/docs/shovel-dynamic) that uses AMQP 0-9-1 for both source and destination, use\n`shovels declare_amqp091`:\n\n```shell\nrabbitmqadmin shovels declare_amqp091 --name my-amqp091-shovel \\\n    --source-uri amqp://username:s3KrE7@source.hostname:5672 \\\n    --destination-uri amqp://username:s3KrE7@source.hostname:5672 \\\n    --ack-mode \"on-confirm\" \\\n    --source-queue \"src.queue\" \\\n    --destination-queue \"dest.queue\"\n```\n\n### Declare an AMQP 1.0 Shovel\n\nTo declare a [dynamic shovel](https://www.rabbitmq.com/docs/shovel-dynamic) that uses AMQP 1.0 for both source and destination, use\n`shovels declare_amqp10`.\n\nNote that\n\n1. With AMQP 1.0 shovels, credentials in the URI are mandatory (there are no defaults)\n2. With AMQP 1.0 shovels, the topology must be pre-declared (an equivalent of `--predeclared-source` and `--predeclared-destination` flags for AMQP 0-9-1 shovels)\n3. AMQP 1.0 shovels should use [AMQP 1.0 addresses v2](https://www.rabbitmq.com/docs/amqp#addresses)\n\n```shell\nrabbitmqadmin shovels declare_amqp10 --name my-amqp1.0-shovel \\\n    --source-uri \"amqp://username:s3KrE7@source.hostname:5672?hostname=vhost:src-vhost\" \\\n    --destination-uri \"amqp://username:s3KrE7@source.hostname:5672?hostname=vhost:dest-vhost\" \\\n    --ack-mode \"on-confirm\" \\\n    --source-address \"/queues/src.queue\" \\\n    --destination-address \"/queues/dest.queue\"\n```\n\n### List Shovels\n\nTo list shovels across all virtual hosts, use `shovels list_all`:\n\n```shell\nrabbitmqadmin shovels list_all\n```\n\n### Delete a Shovel\n\nTo delete a shovel, use `shovels delete --name`:\n\n```shell\nrabbitmqadmin shovels delete --name my-amqp091-shovel\n```\n\n### List Federation Upstreams\n\nTo list [federation upstreams](https://www.rabbitmq.com/docs/federation) across all virtual hosts, use `federation list_all_upstreams`:\n\n```shell\nrabbitmqadmin federation list_all_upstreams\n```\n\n### Create a Federation Upstream for Exchange Federation\n\nTo create a [federation upstream](https://www.rabbitmq.com/docs/federated-exchanges), use `federation declare_upstream_for_exchanges`.\nThis command provides a reduced set of options, only those that are relevant\nspecifically to exchange federation.\n\n```shell\nrabbitmqadmin --vhost \"local-vhost\" federation declare_upstream_for_exchanges --name \"pollux\" \\\n                --uri \"amqp://pollux.eng.megacorp.local:5672/remote-vhost\" \\\n                --ack-mode 'on-publish' \\\n                --prefetch-count 2000 \\\n                --exchange-name \"overridden.name\" \\\n                --queue-type quorum \\\n                --bind-using-nowait true\n```\n\n### Create a Federation Upstream for Queue Federation\n\nTo create a [federation upstream](https://www.rabbitmq.com/docs/federated-queues), use `declare_upstream_for_queues`.\nThis command provides a reduced set of options, only those that are relevant\nspecifically to queue federation.\n\n```shell\nrabbitmqadmin --vhost \"local-vhost\" federation declare_upstream_for_queues --name \"clusters.sirius\" \\\n                --uri \"amqp://sirius.eng.megacorp.local:5672/remote-vhost\" \\\n                --ack-mode 'on-publish' \\\n                --prefetch-count 2000 \\\n                --queue-name \"overridden.name\" \\\n                --consumer-tag \"overridden.ctag\"\n```\n\n### Create a Universal Federation Upstream\n\nTo create a [federation upstream](https://www.rabbitmq.com/docs/federation) that will be (or can be)\nused for federating both queues and exchanges, use `declare_upstream`. It combines\n[all the federation options](https://www.rabbitmq.com/docs/federation-reference), that is,\nthe options of both `declare_upstream_for_queues` and `declare_upstream_for_exchanges`.\n\n```shell\nrabbitmqadmin --vhost \"local-vhost\" federation declare_upstream --name \"pollux\" \\\n                --uri \"amqp://pollux.eng.megacorp.local:5672/remove-vhost\" \\\n                --ack-mode 'on-publish' \\\n                --prefetch-count 2000 \\\n                --queue-name \"overridden.name\" \\\n                --consumer-tag \"overridden.ctag\" \\\n                --exchange-name \"overridden.name\" \\\n                --queue-type quorum \\\n                --bind-using-nowait true\n```\n\n### Delete a Federation Upstream\n\nTo delete a [federation upstream](https://www.rabbitmq.com/docs/federation), use 'federation delete_upstream',\nwhich takes a virtual host and an upstream name:\n\n```shell\nrabbitmqadmin --vhost \"local-vhost\" federation delete_upstream --name \"upstream.to.delete\"\n```\n\n### List Federation Links\n\nTo list all [federation links](https://www.rabbitmq.com/docs/federation) across all virtual hosts, use `federation list_all_links`:\n\n```shell\nrabbitmqadmin federation list_all_links\n```\n\n### Create a User\n\n```shell\n# Salt and hash a cleartext password value, and output the resulting hash.\n# See https://www.rabbitmq.com/docs/passwords to learn more.\nrabbitmqadmin passwords salt_and_hash \"cleartext value\"\n```\n\n```shell\nrabbitmqadmin users declare --name \"new-user\" --password \"secure-password\" --tags \"monitoring,management\"\n```\n\n```shell\n# Create user with administrator tag using pre-hashed password\n# (use 'rabbitmqadmin passwords salt_and_hash' to generate the hash)\nrabbitmqadmin users declare --name \"admin-user\" --password-hash \"{value produced by 'rabbitmqadmin passwords salt_and_hash'}\" --tags \"administrator\"\n```\n\n```shell\n# If RabbitMQ nodes are configured to use SHA512 for passwords, add `--hashing-algorithm`.\n# See https://www.rabbitmq.com/docs/passwords to learn more.\nrabbitmqadmin users declare --name \"secure-user\" --password-hash \"{SHA512-hashed-password}\" --hashing-algorithm \"SHA512\" --tags \"monitoring\"\n```\n\n### Delete a User\n\n```shell\nrabbitmqadmin users delete --name \"user-to-delete\"\n```\n\n```shell\n# Idempotent deletion (won't fail if user doesn't exist)\nrabbitmqadmin users delete --name \"user-to-delete\" --idempotently\n```\n\n### List User Permissions\n\n```shell\n# List all user permissions across all virtual hosts\nrabbitmqadmin permissions list\n```\n\n### Grant Permissions to a User\n\n```shell\nrabbitmqadmin permissions declare --user \"app-user\" --configure \".*\" --write \".*\" --read \".*\"\n```\n\n```shell\nrabbitmqadmin --vhost \"production\" permissions declare --user \"app-user\" --configure \"^amq\\.gen.*|^aliveness-test$\" --write \".*\" --read \".*\"\n```\n\n### Revoke User Permissions\n\n```shell\nrabbitmqadmin --vhost \"production\" permissions delete --user \"app-user\"\n```\n\n```shell\n# Idempotent deletion (won't fail if permissions don't exist)\nrabbitmqadmin --vhost \"production\" permissions delete --user \"app-user\" --idempotently\n```\n\n### Create a Binding\n\n```shell\nrabbitmqadmin --vhost \"events\" bindings declare --source \"events.topic\" --destination-type \"queue\" --destination \"events.processing\" --routing-key \"user.created\"\n```\n\n```shell\nrabbitmqadmin --vhost \"events\" bindings declare --source \"events.fanout\" --destination-type \"exchange\" --destination \"events.archived\" --routing-key \"\" --arguments '{\"x-match\": \"all\"}'\n```\n\n### Delete a Binding\n\n```shell\nrabbitmqadmin --vhost \"events\" bindings delete --source \"events.topic\" --destination-type \"queue\" --destination \"events.processing\" --routing-key \"user.created\"\n```\n\n### List Connections\n\n```shell\nrabbitmqadmin connections list\n```\n\n```shell\n# List connections for a specific user\nrabbitmqadmin connections list_of_user --username \"app-user\"\n```\n\n### Close Connections\n\n```shell\n# Close a specific connection by name\nrabbitmqadmin connections close --name \"connection-name\"\n```\n\n```shell\n# Close all connections from a specific user\nrabbitmqadmin connections close_of_user --username \"a-user\"\n```\n\n### List Channels\n\n```shell\nrabbitmqadmin channels list\n```\n\n```shell\n# List channels in a specific virtual host\nrabbitmqadmin --vhost \"production\" channels list\n```\n\n### Run Health Checks\n\n```shell\n# Check for local alarms\nrabbitmqadmin health_check local_alarms\n```\n\n```shell\n# Check for cluster-wide alarms\nrabbitmqadmin health_check cluster_wide_alarms\n```\n\n```shell\n# Check if node is quorum critical\nrabbitmqadmin health_check node_is_quorum_critical\n```\n\n```shell\n# Check for deprecated features in use\nrabbitmqadmin health_check deprecated_features_in_use\n```\n\n```shell\n# Check if a port listener is running\nrabbitmqadmin health_check port_listener --port 5672\n```\n\n```shell\n# Check if a protocol listener is running\nrabbitmqadmin health_check protocol_listener --protocol \"amqp\"\n```\n\n### Authentication Attempt Statistics\n\n```shell\nrabbitmqadmin auth_attempts stats --node \"rabbit@hostname\"\n```\n\n### Runtime Parameters\n\n```shell\n# List all runtime parameters\nrabbitmqadmin parameters list_all\n```\n\n```shell\n# Set a runtime parameter\nrabbitmqadmin --vhost \"events\" parameters set --component \"federation-upstream\" --name \"upstream-1\" --value '{\"uri\": \"amqp://remote-server\", \"ack-mode\": \"on-publish\"}'\n```\n\n```shell\n# Clear (delete) a runtime parameter\nrabbitmqadmin --vhost \"events\" parameters clear --component \"federation-upstream\" --name \"upstream-1\"\n```\n\n### Global Parameters\n\n```shell\n# List global parameters\nrabbitmqadmin global_parameters list\n```\n\n```shell\n# Set a global parameter\nrabbitmqadmin global_parameters set --name \"cluster_name\" --value '\"production-cluster\"'\n```\n\n```shell\n# Clear (delete) a global parameter\nrabbitmqadmin global_parameters clear --name \"cluster_name\"\n```\n\n### Declare Operator Policies\n\n```shell\nrabbitmqadmin --vhost \"production\" operator_policies declare --name \"queue-limits\" --pattern \".*\" --definition '{\"max-length\": 10000}' --priority 1 --apply-to \"queues\"\n```\n\n### List Operator Policies\n\n```shell\nrabbitmqadmin operator_policies list\n```\n\n### Delete Operator Policies\n\n```shell\nrabbitmqadmin --vhost \"production\" operator_policies delete --name \"queue-limits\"\n```\n\n### Patch (Perform a Partial Update on) an Operator Policy\n\n```shell\nrabbitmqadmin --vhost \"production\" operator_policies patch \\\n  --name \"queue-limits\" \\\n  --definition '{\"max-length\": 7777777}'\n```\n\n### Update an Operator Policy Definition Key\n\n```shell\nrabbitmqadmin --vhost \"production\" operator_policies update_definition \\\n  --name \"queue-limits\" \\\n  --definition-key \"max-length\" \\\n  --new-value \"5000000\"\n```\n\n### Update a Definition Key in All Operator Policies in a Virtual Host\n\n```shell\nrabbitmqadmin --vhost \"production\" operator_policies update_definitions_of_all_in \\\n  --definition-key \"max-length\" \\\n  --new-value \"5000000\"\n```\n\n### Delete Definition Keys from an Operator Policy\n\n```shell\nrabbitmqadmin --vhost \"production\" operator_policies delete_definition_keys \\\n  --name \"queue-limits\" \\\n  --definition-keys max-length,max-length-bytes\n```\n\n### Delete Definition Keys from All Operator Policies in a Virtual Host\n\n```shell\nrabbitmqadmin --vhost \"production\" operator_policies delete_definition_keys_from_all_in \\\n  --definition-keys max-length,max-length-bytes\n```\n\n### List Operator Policies Matching an Object\n\n```shell\nrabbitmqadmin --vhost \"production\" operator_policies list_matching_object --name \"qq.1\" --type \"queues\"\n```\n\n### User Limits\n\nPer-user [resource limits](https://www.rabbitmq.com/docs/user-limits) can be used to restrict how many connections or channels a specific user can open.\n\n```shell\n# List all per-user limits\nrabbitmqadmin user_limits list\n```\n\n```shell\n# Set maximum connections for a user\nrabbitmqadmin user_limits declare --user \"app-user\" --name \"max-connections\" --value 100\n```\n\n```shell\n# Set maximum channels for a user\nrabbitmqadmin user_limits declare --user \"app-user\" --name \"max-channels\" --value 1000\n```\n\n```shell\n# Clear a user limit\nrabbitmqadmin user_limits delete --user \"app-user\" --name \"max-connections\"\n```\n\n### Virtual Host Limits\n\nVirtual host [resource limits](https://www.rabbitmq.com/docs/vhosts#limits) can be used to restrict the maximum number of queues, connections, or other resources in a virtual host.\n\n```shell\n# List all virtual host limits\nrabbitmqadmin vhost_limits list\n```\n\n```shell\n# Set maximum queues for a virtual host\nrabbitmqadmin --vhost \"production\" vhost_limits declare --name \"max-queues\" --value 1000\n```\n\n```shell\n# Set maximum connections for a virtual host\nrabbitmqadmin --vhost \"production\" vhost_limits declare --name \"max-connections\" --value 500\n```\n\n```shell\n# Clear a virtual host limit\nrabbitmqadmin --vhost \"production\" vhost_limits delete --name \"max-queues\"\n```\n\n### List Enabled Plugins\n\n```shell\n# List plugins across all cluster nodes\nrabbitmqadmin plugins list_all\n```\n\n```shell\n# List plugins enabled on a specific node\nrabbitmqadmin plugins list_on_node --node \"rabbit@hostname\"\n```\n\n### Rebalance Quorum Queue Leaders\n\n```shell\n# Rebalances leader members (replicas) for all quorum queues\nrabbitmqadmin rebalance queues\n```\n\n### Stream Operations\n\n```shell\n# List streams\nrabbitmqadmin streams list\n```\n\n```shell\n# List streams with specific columns only\nrabbitmqadmin streams list --columns name,queue_type\n```\n\n```shell\n# Show details for a single stream\nrabbitmqadmin streams show --name \"events.stream\"\n```\n\n```shell\n# Declare a stream\nrabbitmqadmin --vhost \"logs\" streams declare --name \"application.logs\" --expiration \"7D\" --max-length-bytes \"10737418240\"\n```\n\n```shell\n# Delete a stream\nrabbitmqadmin --vhost \"logs\" streams delete --name \"old.stream\"\n```\n\n### Node Operations\n\n```shell\n# List cluster nodes\nrabbitmqadmin nodes list\n```\n\n```shell\n# Memory breakdown in bytes\nrabbitmqadmin nodes memory_breakdown_in_bytes --node \"rabbit@hostname\"\n```\n\n```shell\n# Memory breakdown in percent\nrabbitmqadmin nodes memory_breakdown_in_percent --node \"rabbit@hostname\"\n```\n\n\n## Tanzu RabbitMQ Commands\n\nThe `tanzu` command group provides Tanzu RabbitMQ-specific operations for Schema Definition Sync (SDS) and\nWarm Standby Replication (WSR).\n\n### Schema Definition Sync (SDS) Status\n\n```shell\nrabbitmqadmin tanzu sds status_on_node --node \"rabbit@hostname\"\n```\n\n### Enable/Disable Schema Definition Sync on a Node\n\n```shell\nrabbitmqadmin tanzu sds disable_on_node --node \"rabbit@hostname\"\n```\n\n```shell\nrabbitmqadmin tanzu sds enable_on_node --node \"rabbit@hostname\"\n```\n\n### Enable/Disable Schema Definition Sync Cluster-Wide\n\n```shell\nrabbitmqadmin tanzu sds disable_cluster_wide\n```\n\n```shell\nrabbitmqadmin tanzu sds enable_cluster_wide\n```\n\n### Warm Standby Replication (WSR) Status\n\n```shell\nrabbitmqadmin tanzu wsr status\n```\n\n\n## Subcommand and Long Option Inference\n\nThis feature is available only in the `main` branch\nat the moment.\n\nIf the `RABBITMQADMIN_NON_INTERACTIVE_MODE` is not set to `true`, this tool\nnow can infer subcommand and --long-option names.\n\nThis means that a subcommand can be referenced with its unique prefix,\nthat is,\n\n* 'del queue' will be inferred as 'delete queue'\n* 'del q --nam \"a.queue\"' will be inferred as 'delete queue --name \"a.queue\"'\n\nTo enable each feature, set the following environment variables to\n'true':\n\n* `RABBITMQADMIN_INFER_SUBCOMMANDS`\n* `RABBITMQADMIN_INFER_LONG_OPTIONS`\n\nThis feature is only meant to be used interactively. For non-interactive\nuse, it can be potentially too dangerous to allow.\n\n\n## Configuration Files\n\n`rabbitmqadmin` v2 supports [TOML](https://toml.io/en/)-based configuration files\nstores groups of HTTP API connection settings under aliases (\"node names\" in original `rabbitmqadmin` speak).\n\nHere is an example `rabbitmqadmin` v2 configuration file:\n\n```toml\n[local]\nhostname = \"localhost\"\nport = 15672\nusername = \"lolz\"\npassword = \"lolz\"\nvhost = '/'\n\n[staging]\nhostname = \"192.168.20.31\"\nport = 15672\nusername = \"staging-2387a72329\"\npassword = \"staging-1d20cfbd9d\"\n\n[production]\nhostname = \"(redacted)\"\nport = 15671\nusername = \"user-2ca6bae15ff6b79e92\"\npassword = \"user-92ee4c479ae604cc72\"\n```\n\nInstead of specifying `--hostname` or `--username` on the command line to connect to\na cluster (or specific node) called `staging`, a `--node` alias can be specified instead:\n\n```shell\n# will use the settings from the section called [staging]\nrabbitmqadmin --node staging show churn\n```\n\nDefault configuration file path is at `$HOME/.rabbitmqadmin.conf`, as it was in\nthe original version of `rabbitmqadmin`. It can be overridden on the command line:\n\n```shell\n# will use the settings from the section called [staging]\nrabbitmqadmin --config $HOME/.configuration/rabbitmqadmin.conf --node staging show churn\n```\n\n### Managing Configuration Files\n\nThe `config_file` command group provides operations for managing `rabbitmqadmin` configuration files:\n\n```shell\n# Show the path to the configuration file\nrabbitmqadmin config_file show_path\n\n# Show all configured nodes (passwords masked by default)\nrabbitmqadmin config_file show\nrabbitmqadmin config_file show --reveal-passwords\n\n# Add a new node (fails if an entry with this name already exists)\nrabbitmqadmin config_file add_node --node experiment-001 --host rabbit.eng.example.com --port 15672 --username admin --password secret --vhost /\n\n# Update an existing node (or create one if it does not exist)\n# Only the specified fields are updated; unspecified fields are preserved\nrabbitmqadmin config_file update_node --node experiment-001 --host new-rabbit.eng.example.com --port 15673\n\n# Enable TLS for a node (other settings like username, password are preserved)\nrabbitmqadmin config_file update_node --node experiment-001 --use-tls --port 15671\n\n# Delete a node (a configuration file entry)\nrabbitmqadmin config_file delete_node --node experiment-001\n```\n\n## Intentionally Restricted Environment Variable Support\n\nEnvironment variables have a number of serious downsides compared to a `rabbitmqadmin.conf`\nand the regular `--long-options` on the command line:\n\n1. Non-existent support for value types and validation (\"everything is a string\")\n2. Subprocess inheritance restrictions that can be very time-consuming to debug\n3. Different syntax for setting them between the classic POSIX-era shells (such as `bash`, `zsh`) and modern ones (such as [`nushell`](https://www.nushell.sh/))\n\nFor these reasons and others, `rabbitmqadmin` v2 intentionally uses the configuration file and the\nCLI options over the environment variables.\n\n`rabbitmqadmin` v2 does, however, supports a number of environment variables for a few\nglobal settings that cannot be configured any other way (besides a CLI option),\nor truly represent an environment characteristic, e.g. either the non-interactive mode\nshould be enabled.\n\nThese environment variables are as follows:\n\n| Environment variable                 | Type                                              | When used                             | Description                                                  |\n|--------------------------------------|---------------------------------------------------|---------------------------------------|--------------------------------------------------------------|\n| `RABBITMQADMIN_CONFIG_FILE_PATH`     | Local filesystem path                             | Pre-flight (before command execution) | Same meaning as the global `--confg-file` argument           |\n| `RABBITMQADMIN_NON_INTERACTIVE_MODE` | Boolean                                           | Command execution                     | Enables the non-interactive mode.\u003cbr\u003e\u003cbr\u003eSame meaning as the global `--non-interactive` argument |\n| `RABBITMQADMIN_QUIET_MODE`\u003cbr\u003e       | Boolean                                           | Command execution                     | Instructs the tool to produce less output.\u003cbr\u003e\u003cbr\u003eSame meaning as the global `--quiet` argument |\n| `RABBITMQADMIN_NODE_ALIAS`           | String                                            | Command execution                     | Same meaning as the global `--node` argument                 |\n| `RABBITMQADMIN_TARGET_HOST`          | String                                            | Command execution                     | Same meaning as the global `--host` argument                 |\n| `RABBITMQADMIN_TARGET_PORT`          | Positive integer                                  | Command execution                     | Same meaning as the global `--port` argument                 |\n| `RABBITMQADMIN_API_PATH_PREFIX`      | String                                            | Command execution                     | Same meaning as the global `--path-prefix` argument          |\n| `RABBITMQADMIN_TARGET_VHOST`         | String                                            | Command execution                     | Same meaning as the global `--vhost` argument                |\n| `RABBITMQADMIN_BASE_URI`             | String                                            | Command execution                     | Same meaning as the global `--base-uri` argument             |\n| `RABBITMQADMIN_USE_TLS`              | Boolean                                           | Command execution                     | Same meaning as the global `--tls` argument                  |\n| `RABBITMQADMIN_USERNAME`             | String                                            | Command execution                     | Same meaning as the global `--username` argument             |\n| `RABBITMQADMIN_PASSWORD`             | String                                            | Command execution                     | Same meaning as the global `--password` argument             |\n| `RABBITMQADMIN_TABLE_STYLE`          | Enum, see `--table-style` in `rabbitmqadmin help` | Command execution                     | Same meaning as the global `--table-style` argument          |\n\n\n\n## Project Goals Compared to `rabbitmqadmin` v1\n\nThis version of `rabbitmqadmin` has a few ideas in mind:\n\n* This is a major version bump. Therefore, reasonable breaking changes are OK. `rabbitmqadmin` hasn't seen a revision in fifteen years\n* Some features in `rabbitmqadmin` v1 arguably should never have been built-ins,\n  external tools for data processing and [modern shells](https://www.nushell.sh/) can manipulate tabular data\n  better than `rabbitmqadmin` ever would\n* `rabbitmqadmin` should be standalone binary. There are very few reasons not to build and distribute it that way\n* Standalone project, not an obscure feature: `rabbitmqadmin` should be a standalone tool, not a relatively unknown \"feature\" of\n  the RabbitMQ management plugin, and should be developed as such, not tied completely to the development\n  environment, practices and release schedule of RabbitMQ itself\n* v2 should be a distributed via GitHub releases and not a special `rabbitmq_management` endpoint\n* There is a lot of room to improve validation of flags and arguments, since breaking changes are OK for v2\n* This tool should strive to be as free as practically possible from CVEs in other projects that show up on security scans.\n  CVEs from older Python versions should not plague OCI images that choose to include `rabbitmqadmin` v2\n\n\n## Breaking or Potentially Breaking Changes\n\n### Some Non-Essential Features Were Dropped\n\n`rabbitmqadmin` v2 does not support\n\n * Sorting of results. Instead, use `--non-interactive` and parse the spaces-separated\n   output. Many modern tools for working with data parse it into a table, sort the data set,\n   filter the results, and so on. In fact, these features for data processing are readily available [in some shells](https://www.nushell.sh/)\n * Column selection for most commands. `queues list`, `queues show`, `streams list`, and `streams show` do support `--columns`\n * JSON output for arbitrary commands (with the exception of `definitions` commands).\n   Use the HTTP API directly if you need to work with JSON\n * CSV output for arbitrary commands. This format may be reintroduced\n\n### --snake-case for Command Options\n\n`rabbitmqadmin` v1 used `lower_case` for named command arguments, for example:\n\n```shell\n# Note: auto_delete\nrabbitmqadmin-v1 --vhost \"vh-2\" declare queue name=\"qq.1\" type=\"quorum\" durable=true auto_delete=false\n```\n\n`rabbitmqadmin` v2 uses a more typical `--snake-case` format for the same arguments:\n\n```shell\n# Note: --auto-delete\nrabbitmqadmin --vhost \"vh-2\" declare queue --name \"qq.1\" --type \"quorum\" --durable true --auto-delete false\n```\n\n### Global Arguments Come First\n\nGlobal flags in `rabbitmqadmin` v2 must precede the command category (e.g. `list`) and the command itself,\nnamely various HTTP API endpoint options and `--vhost`:\n\n```shell\nrabbitmqadmin --vhost \"events\" declare queue --name \"target.quorum.queue.name\" --type \"quorum\" --durable true\n```\n\n### --prefix Overrides API Path Prefix\n\nIn `rabbitmqadmin` v1, `--path-prefix` appended to the default [API path prefix](https://rabbitmq.com/docs/management#path-prefix).\nIn this version, the value passed to `--path-prefix` will be used as given, in other words,\nit replaces the default prefix, `/api`.\n\n### Configuration File Format Moved to TOML\n\n`rabbitmqadmin` v1 supported ini configuration files that allowed\nthe user to group a number of command line values under a name, e.g. a cluster or node nickname.\n\nDue to the \"no dependencies other than Python\" design goal of `rabbitmqadmin` v1, this feature was not really tested,\nand the specific syntax (that of ini files, supported by Python's [`ConfigParser`](https://docs.python.org/3/library/configparser.html)) linting, parsing or generation tools were not really available.\n\n`rabbitmqadmin` v2 replaces this format with [TOML](https://toml.io/en/), a popular configuration standard\nwith [verification and linting tools](https://www.toml-lint.com/), as well as very mature parser\nthat is not at all specific to `rabbitmqadmin` v2.\n\nHere is an example `rabbitmqadmin` v2 configuration file:\n\n```toml\n[local]\nhostname = \"localhost\"\nport = 15672\nusername = \"lolz\"\npassword = \"lolz\"\nvhost = '/'\n\n[staging]\nhostname = \"192.168.20.31\"\nport = 15672\nusername = \"staging-2387a72329\"\npassword = \"staging-1d20cfbd9d\"\n\n[production]\nhostname = \"(redacted)\"\nport = 15671\n\nusername = \"user-efe1f4d763f6\"\npassword = \"(redacted)\"\n\ntls = true\nca_certificate_bundle_path = \"/path/to/ca_certificate.pem\"\nclient_certificate_file_path = \"/path/to/client_certificate.pem\"\nclient_private_key_file_path = \"/path/to/client_key.pem\"\n```\n\n\n## License\n\nThis tool, `rabbitmqadmin` (v2 and later versions), is dual-licensed under\nthe Apache Software License 2.0 and the MIT license.\n\nSPDX-License-Identifier: Apache-2.0 OR MIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabbitmq%2Frabbitmqadmin-ng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frabbitmq%2Frabbitmqadmin-ng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabbitmq%2Frabbitmqadmin-ng/lists"}