2019-09-25 17:48:01 +08:00
. \" vim:ft=nroff:
2021-11-30 22:43:42 +08:00
. \" This Source Code Form is subject to the terms of the Mozilla Public
2020-07-10 21:31:17 +08:00
. \" License, v. 2.0. If a copy of the MPL was not distributed with this
. \" file, You can obtain one at https://mozilla.org/MPL/2.0/.
2019-09-25 17:48:01 +08:00
. \"
2023-11-22 12:18:22 +08:00
. \" Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
2019-09-25 17:48:01 +08:00
. \"
2023-06-22 06:01:43 +08:00
.Dd June 22 , 2023
2019-09-25 17:48:01 +08:00
.Dt RABBITMQ-QUEUES 8
.Os "RabbitMQ Server"
.Sh NAME
.Nm rabbitmq-queues
.Nd RabbitMQ queue management tools
. \" ------------------------------------------------------------------
.Sh SYNOPSIS
. \" ------------------------------------------------------------------
.Nm
.Op Fl q
.Op Fl s
.Op Fl l
.Op Fl n Ar node
.Op Fl t Ar timeout
.Ar command
.Op Ar command_options
. \" ------------------------------------------------------------------
.Sh DESCRIPTION
. \" ------------------------------------------------------------------
.Nm
is a command line tool that provides commands used to manage queues,
2021-06-18 08:58:08 +08:00
for example, grow, shrink or rebalance replicas of replicated queue types.
2019-09-25 17:48:01 +08:00
See the
2024-09-23 17:34:54 +08:00
.Lk https://www.rabbitmq.com/docs/quorum-queues "RabbitMQ quorum queues guide"
2021-06-18 08:58:08 +08:00
and the general
2024-09-23 17:34:54 +08:00
.Lk https://www.rabbitmq.com/docs/queues "RabbitMQ queues guide"
2019-09-25 17:48:01 +08:00
to learn more about queue types in RabbitMQ.
.
. \" ------------------------------------------------------------------
.Sh OPTIONS
. \" ------------------------------------------------------------------
.Bl -tag -width Ds
.It Fl n Ar node
Default node is
.Qq Pf rabbit@ Ar target-hostname ,
where
.Ar target-hostname
is the local host.
On a host named
.Qq myserver.example.com ,
the node name will usually be
.Qq rabbit@myserver
(unless
.Ev RABBITMQ_NODENAME
has been overridden).
The output of
.Qq hostname -s
is usually the correct suffix to use after the
.Qq @
sign.
See
.Xr rabbitmq-server 8
for details of configuring a RabbitMQ node.
.It Fl q , -quiet
Quiet output mode is selected.
Informational messages are reduced when quiet mode is in effect.
.It Fl s , -silent
Silent output mode is selected.
Informational messages are reduced and table headers are suppressed when silent mode is in effect.
.It Fl t Ar timeout , Fl -timeout Ar timeout
Operation timeout in seconds.
Not all commands support timeouts.
Default is
.Cm infinity .
.It Fl l , Fl -longnames
Must be specified when the cluster is configured to use long (FQDN) node names.
To learn more, see the
2024-09-23 17:34:54 +08:00
.Lk https://www.rabbitmq.com/docs/clustering "RabbitMQ Clustering guide"
2019-09-25 17:48:01 +08:00
.It Fl -erlang-cookie Ar cookie
Shared secret to use to authenticate to the target node.
Prefer using a local file or the
.Ev RABBITMQ_ERLANG_COOKIE
environment variable instead of specifying this option on the command line.
To learn more, see the
2024-09-23 17:34:54 +08:00
.Lk https://www.rabbitmq.com/docs/cli "RabbitMQ CLI Tools guide"
2019-09-25 17:48:01 +08:00
.El
. \" ------------------------------------------------------------------
.Sh COMMANDS
. \" ------------------------------------
.Bl -tag -width Ds
. \" ------------------------------------
.It Cm help
.Pp
Displays general help and commands supported by
.Nm .
.El
.Ss Cluster
.Bl -tag -width Ds
. \" ------------------------------------
2019-09-27 00:00:37 +08:00
.It Cm grow Ar node Ar selector Fl -vhost-pattern Ar pattern Fl -queue-pattern Ar pattern Fl -errors-only
2019-09-25 17:48:01 +08:00
.Pp
2019-09-26 13:18:59 +08:00
Adds a new replica on the given node for all or a half of matching quorum queues.
.Pp
2019-09-27 00:00:37 +08:00
Supported
.Ar selector
values are:
2019-09-27 00:08:53 +08:00
.Bl -tag -width Ds
2019-09-27 00:27:14 +08:00
.It Dv Sy all
2019-09-27 00:08:53 +08:00
Selects all quorum queues
2019-09-27 00:27:14 +08:00
.It Dv Sy even
2019-09-27 00:08:53 +08:00
Selects quorum queues with an even number of replicas
.El
2019-09-27 00:00:37 +08:00
.Pp
2019-09-26 13:18:59 +08:00
Example:
.Sp
2019-09-27 00:27:14 +08:00
.Dl rabbitmq-queues grow Qo rabbit@newhost Qc Qo all Qc --vhost-pattern Qo a-vhost Qc --queue-pattern Qo .* Qc
2019-09-25 17:48:01 +08:00
. \" ------------------------------------
2019-09-26 13:18:59 +08:00
.It Cm rebalance Ar type Fl -vhost-pattern Ar pattern Fl -queue-pattern Ar pattern
2019-09-25 17:48:01 +08:00
.Pp
2021-07-02 19:11:43 +08:00
Rebalances queue leader replicas across cluster nodes.
2019-09-26 01:27:26 +08:00
.Pp
2019-09-27 00:00:37 +08:00
Supported
.Ar type
values are:
2019-09-27 00:08:53 +08:00
.Bl -tag -width Ds
2019-09-27 00:27:14 +08:00
.It Dv Sy all
2019-09-27 00:08:53 +08:00
All queue types
2019-09-27 00:27:14 +08:00
.It Dv Sy quorum
2019-09-27 00:08:53 +08:00
Only quorum queues
2019-09-27 00:27:14 +08:00
.It Dv Sy classic
2019-09-27 00:08:53 +08:00
Only classic queues
2022-12-19 17:50:40 +08:00
.It Dv Sy stream
Only streams
2019-09-27 00:08:53 +08:00
.El
2019-09-27 00:00:37 +08:00
.Pp
2019-09-26 01:27:26 +08:00
Example:
.Sp
2019-09-27 00:27:14 +08:00
.Dl rabbitmq-queues rebalance Qo all Qc --vhost-pattern Qo a-vhost Qc --queue-pattern Qo .* Qc
2019-09-25 17:48:01 +08:00
. \" ------------------------------------
2019-09-26 13:18:59 +08:00
.It Cm shrink Ar node
2019-09-25 17:48:01 +08:00
.Pp
Shrinks quorum queue clusters by removing any members (replicas) on the given node.
2019-09-27 00:27:14 +08:00
.Pp
2019-09-26 13:18:59 +08:00
Example:
.Sp
2019-09-27 00:27:14 +08:00
.Dl rabbitmq-queues shrink Qo rabbit@decomissioned-node Qc
2019-09-25 17:48:01 +08:00
. \" ------------------------------------
.El
.Ss Replication
.Bl -tag -width Ds
. \" ------------------------------------
2019-09-26 13:18:59 +08:00
.It Cm add_member Ar queue Ar node Fl -vhost Ar virtual-host
.Pp
Adds a quorum queue member (replica) on the given node.
2019-09-25 17:48:01 +08:00
.Pp
2019-09-26 13:18:59 +08:00
Example:
.Sp
2019-09-27 00:27:14 +08:00
.Dl rabbitmq-queues add_member --vhost Qo a-vhost Qc Qo a-queue Qc Qo rabbit@new-node Qc
2019-09-25 17:48:01 +08:00
. \" ------------------------------------
2019-09-26 13:18:59 +08:00
.It Cm delete_member Ar queue Ar node Fl -vhost Ar virtual-host
.Pp
Removes a quorum queue member (replica) on the given node.
2019-09-25 17:48:01 +08:00
.Pp
2019-09-26 13:18:59 +08:00
Example:
.Sp
2019-09-27 00:27:14 +08:00
.Dl rabbitmq-queues delete_member --vhost Qo a-vhost Qc Qo a-queue Qc Qo rabbit@decomissioned-node Qc
2019-09-25 17:48:01 +08:00
. \" ------------------------------------
.El
.Ss Queues
.Bl -tag -width Ds
. \" ------------------------------------
2019-09-26 13:18:59 +08:00
.It Cm quorum_status Ar queue Fl -vhost Ar virtual-host
2019-09-25 17:48:01 +08:00
.Pp
Displays quorum status of a quorum queue.
2019-09-26 13:18:59 +08:00
.Pp
Example:
.Sp
2019-09-27 00:27:14 +08:00
.Dl rabbitmq-queues quorum_status --vhost Qo a-vhost Qc Qo a-queue Qc
2023-09-01 03:11:19 +08:00
.It Cm peek Ar queue Ar position Fl -vhost Ar virtual-host Fl -timeout
.Pp
Displays the details of a message at the given position in the queue.
This command is currently only supported by quorum queues.
.Pp
Example:
.Sp
.Dl rabbitmq-queues peek --vhost Qo a-vhost Qc Qo a-queue Qc Qo 1 Qc
2024-08-15 00:35:12 +08:00
.It Cm check_if_cluster_has_classic_queue_mirroring_policy
2020-04-11 02:57:50 +08:00
.Pp
2024-08-15 00:35:12 +08:00
Health check that exits with a non-zero code if there are policies in the cluster that enable classic queue mirroring.
Classic queue mirroring has been deprecated since 2021 and was completely removed in the RabbitMQ 4.0 development cycle.
2020-04-11 02:57:50 +08:00
.Pp
Example:
.Sp
2024-08-15 00:35:12 +08:00
.Dl rabbitmq-queues check_if_cluster_has_classic_queue_mirroring_policy
2020-04-11 02:57:50 +08:00
.It Cm check_if_node_is_quorum_critical
.Pp
Health check that exits with a non-zero code if there are queues with minimum online quorum (queues that would lose their quorum if the target node is shut down).
.Pp
Example:
.Sp
.Dl rabbitmq-queues check_if_node_is_quorum_critical
2019-09-26 13:53:48 +08:00
. \" ------------------------------------------------------------------
.Sh SEE ALSO
. \" ------------------------------------------------------------------
.Xr rabbitmqctl 8 ,
.Xr rabbitmq-diagnostics 8 ,
.Xr rabbitmq-server 8 ,
2022-09-22 18:00:48 +08:00
.Xr rabbitmq-streams 8 ,
2019-09-26 13:53:48 +08:00
.Xr rabbitmq-upgrade 8 ,
.Xr rabbitmq-service 8 ,
.Xr rabbitmq-env.conf 5 ,
.Xr rabbitmq-echopid 8
. \" ------------------------------------------------------------------
.Sh AUTHOR
. \" ------------------------------------------------------------------
2024-08-15 00:35:12 +08:00
.An The RabbitMQ Team Aq Mt contact-tanzu-data.pdl@broadcom.com