RABBITMQ-QUEUES(8)

πŸ’… RABBITMQ-QUEUES(8) β€” like, the whole manual, bestie

okay so this is a page from the System Manager's Manual and honestly? it's kind of a bop. it's rabbitmq-queues, and we're gonna go through it together, no skipping, no cap.


🌸 NAME 🌸

rabbitmq-queues β€” the RabbitMQ queue management tools. that's the whole vibe. queue management. iconic behavior only.


✨ SYNOPSIS ✨

rabbitmq-queues [-q] [-s] [-l] [-n node] [-t timeout] command
                [command_options]

literally just: flags, a command, and whatever that command needs. we love a flexible girlie. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so rabbitmq-queues is a command line tool, right, and it gives you a bunch of commands for managing queues β€” like growing, shrinking, or rebalancing replicas of replicated queue types. very main character energy, very "i handle the cluster so you don't have to."

if you wanna actually learn about queue types in RabbitMQ (and honestly you should), go read the RabbitMQ quorum queues guide at https://www.rabbitmq.com/docs/quorum-queues and the general RabbitMQ queues guide at https://www.rabbitmq.com/docs/queues. both linked, both slay. πŸ’–


πŸŽ€ OPTIONS πŸŽ€

  • -n node β€” picks which node you're talking to. default is "rabbit@target-hostname", where target-hostname is the local host. so on a host named "myserver.example.com", the node name will usually be "rabbit@myserver" β€” unless RABBITMQ_NODENAME has been overridden, in which case, plot twist. the output of hostname -s is usually the correct suffix to stick after the @ sign. and if you wanna know all the details of configuring a RabbitMQ node, go see rabbitmq-server(8). ✨
  • -q, --quiet β€” quiet output mode is selected. informational messages get reduced when quiet mode is in effect. she's chill. she's lowkey. 🀫
  • -s, --silent β€” silent output mode is selected. informational messages get reduced and table headers are suppressed when silent mode is in effect. even quieter. no tables, no small talk. πŸ’€
  • -t timeout, --timeout timeout β€” operation timeout, in seconds. important caveat bestie: not all commands support timeouts. default is infinity. so like, go off, wait forever, i guess. ⏳
  • -l, --longnames β€” you must specify this when the cluster is configured to use long (FQDN) node names. to learn more, see the RabbitMQ Clustering guide: https://www.rabbitmq.com/docs/clustering. don't skip this one, she's mandatory in that situatioβ€” πŸ’…
  • --erlang-cookie cookie β€” the shared secret used to authenticate to the target node. real talk though: prefer using a local file or the RABBITMQ_ERLANG_COOKIE environment variable instead of specifying this option on the command line. security girlies know. to learn more, see the RabbitMQ CLI Tools guide: https://www.rabbitmq.com/docs/cli. πŸ”

πŸ‘‘ COMMANDS πŸ‘‘

🌈 help

displays general help and the commands supported by rabbitmq-queues. the "hi, what can you do" of it all. 🫢


🧚 Cluster

grow node selector --vhost-pattern pattern --queue-pattern pattern --errors-only

adds a new replica on the given node for all β€” or half β€” of the matching queues. half! like a lil split. ✨

supported selector values are:

  • all β€” selects all replicated queues
  • even β€” selects replicated queues with an even number of replicas

example:

rabbitmq-queues grow "rabbit@newhost" "all"
--vhost-pattern "a-vhost" --queue-pattern ".*"

rebalance type --vhost-pattern pattern --queue-pattern pattern

rebalances queue leader replicas across cluster nodes. spreading the leadership out, very democratic of her. πŸ‘‘

supported type values are:

  • all β€” all queue types
  • quorum β€” only quorum queues
  • classic β€” only classic queues
  • stream β€” only streams

example:

rabbitmq-queues rebalance "all" --vhost-pattern "a-vhost"
--queue-pattern ".*"

shrink node

shrinks queue clusters by removing any members (replicas) on the given node. (yes they spelled it "decomissioned" in the example, and yes we're keeping it exactly as-is, character for character, because that's the rule. πŸŽ€)

example:

rabbitmq-queues shrink "rabbit@decomissioned-node"

πŸ“ Replication

add_member queue node --vhost virtual-host

adds a queue member (replica) on the given node. new friend joins the queue. 🫢

example:

rabbitmq-queues add_member --vhost "a-vhost" "a-queue"
"rabbit@new-node"

delete_member queue node --vhost virtual-host

removes a queue member (replica) on the given node. friend leaves. it's fine. we're fine. 😭

example:

rabbitmq-queues delete_member --vhost "a-vhost" "a-queue"
"rabbit@decomissioned-node"

transfer_leadership queue node --vhost virtual-host

transfers the leadership of a quorum queue to the given node. passing the crown. handing over the aux. πŸ‘‘

example:

rabbitmq-queues transfer_leadership --vhost "a-vhost"
"a-queue" "rabbit@new-leader-node"

🧊 Queues

quorum_status queue --vhost virtual-host

displays quorum status of a queue. just a lil status check, you know how it is. πŸ”

example:

rabbitmq-queues quorum_status --vhost "a-vhost" "a-queue"

peek queue position --vhost virtual-host --timeout

displays the details of a message at the given position in the queue. πŸ‘€ important: this command is currently only supported by quorum queues. so if it's not a quorum queue, this is not your moment. πŸ™ˆ

example:

rabbitmq-queues peek --vhost "a-vhost" "a-queue" "1"

check_if_cluster_has_classic_queue_mirroring_policy

health check that exits with a non-zero code if there are policies in the cluster that enable classic queue mirroring. and here's the lore: classic queue mirroring has been deprecated since 2021 and was completely removed in the RabbitMQ 4.0 development cycle. so yeah. she's gone. πŸ’€

example:

rabbitmq-queues
check_if_cluster_has_classic_queue_mirroring_policy

check_if_node_is_quorum_critical

health check that exits with a non-zero code if there are queues with minimum online quorum β€” those are queues that would lose their quorum if the target node is shut down. dramatic? yes. accurate? also yes. ⚠️

example:

rabbitmq-queues check_if_node_is_quorum_critical

πŸ”₯ SEE ALSO πŸ”₯

rabbitmqctl(8), rabbitmq-diagnostics(8), rabbitmq-server(8), rabbitmq-streams(8), rabbitmq-upgrade(8), rabbitmq-service(8), rabbitmq-env.conf(5)

the whole friend group, fr fr. go read them too. ✨


πŸ’œ AUTHOR πŸ’œ

The RabbitMQ Team <contact-tanzu-data.pdl@broadcom.com> β€” mwah, love you, thanks for the queues. 🫢


okay that's the page!! and per the lil footer situation: this was the RabbitMQ Server manual page, dated June 22, 2023, version vibes RABBITMQ-QUEUES(8) all the way through. πŸ’– periodt. πŸ¦‹

πŸ“¦ where this page comes from