RABBITMQCTL(8) | System Manager's Manual | RABBITMQCTL(8) |
rabbitmqctl
—
command line for managing a RabbitMQ broker
rabbitmqctl |
[-q ] [-l ]
[-n node]
[-t timeout]
command [command_options] |
RabbitMQ is an implementation of AMQP, the emerging standard for high performance enterprise messaging. The RabbitMQ Server is a robust and scalable implementation of an AMQP broker.
rabbitmqctl
is a command line tool for
managing a RabbitMQ broker. It performs all actions by connecting to one of
the broker's nodes.
Diagnostic information is displayed if the broker was not running, could not be reached, or rejected the connection due to mismatching Erlang cookies.
-n
nodeRABBITMQ_NODENAME
has been set to some non-default
value at broker startup time). The output of "hostname -s" is
usually the correct suffix to use after the "@" sign. See
rabbitmq-server(8) for details of configuring the
RabbitMQ broker.-q
,
--quiet
--dry-run
-t
timeout, --timeout
timeoutinfinity
.-l
,
--longnames
help
[-l
] [command_name]-l
,
--list-commands
force_reset
The force_reset
command differs from
reset
in that it resets the node
unconditionally, regardless of the current management database state and
cluster configuration. It should only be used as a last resort if the
database or cluster configuration has been corrupted.
For reset
and
force_reset
to succeed the RabbitMQ application
must have been stopped, e.g. with stop_app
.
For example, to reset the RabbitMQ node:
rabbitmqctl
force_reset
hipe_compile
directoryParent directories are created if necessary. Any existing .beam files from the directory are automatically deleted prior to compilation.
To use this precompiled files, you should set
RABBITMQ_SERVER_CODE_PATH
environment variable
to directory specified in hipe_compile
invokation.
For example, to HiPE-compile modules and store them to /tmp/rabbit-hipe/ebin directory:
rabbitmqctl hipe_compile
/tmp/rabbit-hipe/ebin
reset
Removes the node from any cluster it belongs to, removes all data from the management database, such as configured users and vhosts, and deletes all persistent messages.
For reset
and
force_reset
to succeed the RabbitMQ application
must have been stopped, e.g. with stop_app
.
For example, to resets the RabbitMQ node:
rabbitmqctl reset
rotate_logs
Log rotation is performed according to lager settings specified in configuration file.
Note that there is no need to call this command in case of external log rotation (e.g. from logrotate(8)), because lager detects renames and automatically reopens log files.
For example, this command starts internal log rotation process:
rabbitmqctl
rotate_logs
Rotation is performed asynchronously, so there is no guarantee that it will be completed when this command returns.
shutdown
Unlike the stop command, the shutdown command:
For example, to shut down the Erlang process on which RabbitMQ is running:
rabbitmqctl shutdown
start_app
This command is typically run after performing other
management actions that required the RabbitMQ application to be stopped,
e.g. reset
.
For example, to instruct the RabbitMQ node to start the RabbitMQ application:
rabbitmqctl
start_app
stop
[pid_file]If a pid_file is specified, also waits
for the process specified there to terminate. See the description of the
wait
command for details on this file.
For example, to instruct the RabbitMQ node to terminate:
rabbitmqctl stop
stop_app
This command is typically run prior to performing other
management actions that require the RabbitMQ application to be stopped,
e.g. reset
.
For example, to instruct the RabbitMQ node to stop the RabbitMQ application:
rabbitmqctl stop_app
wait
pid_file, wait
--pid
pidThis command will wait for the RabbitMQ application to start
at the node. It will wait for the pid file to be created if
pidfile is specified, then for a process with a
pid specified in the pid file or the --pid
argument, and then for the RabbitMQ application to start in that
process. It will fail if the process terminates without starting the
RabbitMQ application.
If the specified pidfile is not created or erlang node is not
started within --timeout
the command will fail.
Default timeout is 10 seconds.
A suitable pid file is created by the
rabbitmq-server(8) script. By default this is located
in the Mnesia directory. Modify the
RABBITMQ_PID_FILE
environment variable to change
the location.
For example, this command will return when the RabbitMQ node has started up:
rabbitmqctl wait
/var/run/rabbitmq/pid
join_cluster
clusternode [--ram
]--ram
Instructs the node to become a member of the cluster that the
specified node is in. Before clustering, the node is reset, so be
careful when using this command. For this command to succeed the
RabbitMQ application must have been stopped, e.g. with
stop_app
.
Cluster nodes can be of two types: disc or RAM. Disc nodes replicate data in RAM and on disc, thus providing redundancy in the event of node failure and recovery from global events such as power failure across all nodes. RAM nodes replicate data in RAM only (with the exception of queue contents, which can reside on disc if the queue is persistent or too big to fit in memory) and are mainly used for scalability. RAM nodes are more performant only when managing resources (e.g. adding/removing queues, exchanges, or bindings). A cluster must always have at least one disc node, and usually should have more than one.
The node will be a disc node by default. If you wish to create
a RAM node, provide the --ram
flag.
After executing the join_cluster
command, whenever the RabbitMQ application is started on the current
node it will attempt to connect to the nodes that were in the cluster
when the node went down.
To leave a cluster, reset
the node.
You can also remove nodes remotely with the
forget_cluster_node
command.
For more details see the Clustering guide.
For example, this command instructs the RabbitMQ node to join the cluster that "hare@elena" is part of, as a ram node:
rabbitmqctl join_cluster
hare@elena --ram
cluster_status
For example, this command displays the nodes in the cluster:
rabbitmqctl
cluster_status
change_cluster_node_type
typeThe type must be one of the following:
The node must be stopped for this operation to succeed, and when turning a node into a RAM node the node must not be the only disc node in the cluster.
For example, this command will turn a RAM node into a disc node:
rabbitmqctl
change_cluster_node_type disc
forget_cluster_node
[--offline
]--offline
Removes a cluster node remotely. The node that is being
removed must be offline, while the node we are removing from must be
online, except when using the --offline
flag.
When using the --offline
flag ,
rabbitmqctl
will not attempt to connect to a
node as normal; instead it will temporarily become the node in order to
make the change. This is useful if the node cannot be started normally.
In this case the node will become the canonical source for cluster
metadata (e.g. which queues exist), even if it was not before. Therefore
you should use this command on the latest node to shut down if at all
possible.
For example, this command will remove the node "rabbit@stringer" from the node "hare@mcnulty":
rabbitmqctl -n hare@mcnulty
forget_cluster_node rabbit@stringer
rename_cluster_node
oldnode1 newnode1
[oldnode2 newnode2 ...]This subcommand causes rabbitmqctl
to
temporarily become the node in order to make the change. The local
cluster node must therefore be completely stopped; other nodes can be
online or offline.
This subcommand takes an even number of arguments, in pairs representing the old and new names for nodes. You must specify the old and new names for this node and for any other nodes that are stopped and being renamed at the same time.
It is possible to stop all nodes and rename them all simultaneously (in which case old and new names for all nodes must be given to every node) or stop and rename nodes one at a time (in which case each node only needs to be told how its own name is changing).
For example, this command will rename the node "rabbit@misshelpful" to the node "rabbit@cordelia"
rabbitmqctl rename_cluster_node
rabbit@misshelpful rabbit@cordelia
Note that this command only changes the local database. It may also be necessary to rename the local database directories, and to configure the new node name. For example:
rabbitmqctl stop
rabbit@misshelpful
rabbitmqctl
rename_cluster_node rabbit@misshelpful rabbit@cordelia
mv \ /var/lib/rabbitmq/mnesia/rabbit\@misshelpful \ /var/lib/rabbitmq/mnesia/rabbit\@cordelia mv \ /var/lib/rabbitmq/mnesia/rabbit\@misshelpful-rename \ /var/lib/rabbitmq/mnesia/rabbit\@cordelia-rename mv \ /var/lib/rabbitmq/mnesia/rabbit\@misshelpful-plugins-expand \ /var/lib/rabbitmq/mnesia/rabbit\@cordelia-plugins-expand
update_cluster_nodes
clusternodeInstructs an already clustered node to contact
clusternode to cluster when waking up. This is
different from join_cluster
since it does not
join any cluster - it checks that the node is already in a cluster with
clusternode.
The need for this command is motivated by the fact that clusters can change while a node is offline. Consider the situation in which node A and B are clustered. A goes down, C clusters with B, and then B leaves the cluster. When A wakes up, it'll try to contact B, but this will fail since B is not in the cluster anymore. The following command will solve this situation:
update_cluster_nodes -n
A C
force_boot
Normally when you shut down a RabbitMQ cluster altogether, the first node you restart should be the last one to go down, since it may have seen things happen that other nodes did not. But sometimes that's not possible: for instance if the entire cluster loses power then all nodes may think they were not the last to shut down.
In such a case you can invoke
force_boot
while the node is down. This will
tell the node to unconditionally start next time you ask it to. If any
changes happened to the cluster after this node shut down, they will be
lost.
If the last node to go down is permanently lost then you
should use forget_cluster_node
--offline
in preference to this command, as it
will ensure that mirrored queues which were mastered on the lost node
get promoted.
For example, this will force the node not to wait for other nodes next time it is started:
rabbitmqctl
force_boot
sync_queue
[-p
vhost]
queueInstructs a mirrored queue with unsynchronised slaves to synchronise itself. The queue will block while synchronisation takes place (all publishers to and consumers from the queue will block). The queue must be mirrored for this command to succeed.
Note that unsynchronised queues from which messages are being drained will become synchronised eventually. This command is primarily useful for queues which are not being drained.
cancel_sync_queue
[-p
vhost]
queueInstructs a synchronising mirrored queue to stop synchronising itself.
purge_queue
[-p
vhost]
queuePurges a queue (removes all messages in it).
set_cluster_name
nameFor example, this sets the cluster name to "london":
rabbitmqctl set_cluster_name
london
Note that rabbitmqctl
manages the RabbitMQ
internal user database. Users from any alternative authentication backend
will not be visible to rabbitmqctl
.
add_user
username passwordFor example, this command instructs the RabbitMQ broker to create a (non-administrative) user named "tonyg" with (initial) password "changeit":
rabbitmqctl add_user tonyg
changeit
delete_user
usernameFor example, this command instructs the RabbitMQ broker to delete the user named "tonyg":
rabbitmqctl delete_user
tonyg
change_password
username newpasswordFor example, this command instructs the RabbitMQ broker to change the password for the user named "tonyg" to "newpass":
rabbitmqctl change_password tonyg
newpass
clear_password
usernameFor example, this command instructs the RabbitMQ broker to clear the password for the user named "tonyg":
rabbitmqctl clear_password
tonyg
This user now cannot log in with a password (but may be able to through e.g. SASL EXTERNAL if configured).
authenticate_user
username passwordFor example, this command instructs the RabbitMQ broker to authenticate the user named "tonyg" with password "verifyit":
rabbitmqctl authenticate_user
tonyg verifyit
For example, this command instructs the RabbitMQ broker to ensure the user named "tonyg" is an administrator:
rabbitmqctl set_user_tags tonyg
administrator
This has no effect when the user logs in via AMQP, but can be used to permit the user to manage users, virtual hosts and permissions when the user logs in via some other means (for example with the management plugin).
This command instructs the RabbitMQ broker to remove any tags from the user named "tonyg":
rabbitmqctl set_user_tags
tonyg
list_users
For example, this command instructs the RabbitMQ broker to list all users:
rabbitmqctl
list_users
Note that rabbitmqctl
manages the RabbitMQ
internal user database. Permissions for users from any alternative
authorisation backend will not be visible to
rabbitmqctl
.
add_vhost
vhostCreates a virtual host.
For example, this command instructs the RabbitMQ broker to create a new virtual host called "test":
rabbitmqctl add_vhost
test
delete_vhost
vhostDeletes a virtual host.
Deleting a virtual host deletes all its exchanges, queues, bindings, user permissions, parameters and policies.
For example, this command instructs the RabbitMQ broker to delete the virtual host called "test":
rabbitmqctl delete_vhost
test
list_vhosts
[vhostinfoitem ...]The vhostinfoitem parameter is used to indicate which virtual host information items to include in the results. The column order in the results will match the order of the parameters. vhostinfoitem can take any value from the list that follows:
name
tracing
If no vhostinfoitem are specified then the vhost name is displayed.
For example, this command instructs the RabbitMQ broker to list all virtual hosts:
rabbitmqctl list_vhosts name
tracing
set_permissions
[-p
vhost]
user conf
write readSets user permissions.
For example, this command instructs the RabbitMQ broker to grant the user named "tonyg" access to the virtual host called "/myvhost", with configure permissions on all resources whose names starts with "tonyg-", and write and read permissions on all resources:
rabbitmqctl set_permissions -p
/myvhost tonyg "^tonyg-.*" ".*"
".*"
clear_permissions
[-p
vhost]
usernameSets user permissions.
For example, this command instructs the RabbitMQ broker to deny the user named "tonyg" access to the virtual host called "/myvhost":
rabbitmqctl clear_permissions -p
/myvhost tonyg
list_permissions
[-p
vhost]Lists permissions in a virtual host.
For example, this command instructs the RabbitMQ broker to list all the users which have been granted access to the virtual host called "/myvhost", and the permissions they have for operations on resources in that virtual host. Note that an empty string means no permissions granted:
rabbitmqctl list_permissions -p
/myvhost
list_user_permissions
usernameLists user permissions.
For example, this command instructs the RabbitMQ broker to list all the virtual hosts to which the user named "tonyg" has been granted access, and the permissions the user has for operations on resources in these virtual hosts:
rabbitmqctl list_user_permissions
tonyg
set_topic_permissions
[-p
vhost]
user exchange
write readSets user topic permissions.
For example, this command instructs the RabbitMQ broker to let the user named "tonyg" publish and consume messages going through the "amp.topic" exchange of the "/myvhost" virtual host with a routing key starting with "tonyg-":
rabbitmqctl set_topic_permissions
-p /myvhost tonyg amq.topic "^tonyg-.*"
"^tonyg-.*"
Topic permissions support variable expansion for the following variables: username, vhost, and client_id. Note that client_id is expanded only when using MQTT. The previous example could be made more generic by using "^{username}-.*":
rabbitmqctl set_topic_permissions
-p /myvhost tonyg amq.topic "^{username}-.*"
"^{username}-.*"
clear_topic_permissions
[-p
vhost]
username [exchange]Clear user topic permissions.
For example, this command instructs the RabbitMQ broker to remove topic permissions for user named "tonyg" for the topic exchange "amq.topic" in the virtual host called "/myvhost":
rabbitmqctl
clear_topic_permissions -p /myvhost tonyg amq.topic
list_topic_permissions
[-p
vhost]Lists topic permissions in a virtual host.
For example, this command instructs the RabbitMQ broker to list all the users which have been granted topic permissions in the virtual host called "/myvhost:"
rabbitmqctl
list_topic_permissions -p /myvhost
list_user_topic_permissions
usernameLists user topic permissions.
For example, this command instructs the RabbitMQ broker to list all the virtual hosts to which the user named "tonyg" has been granted access, and the topic permissions the user has in these virtual hosts:
rabbitmqctl
list_topic_user_permissions tonyg
Certain features of RabbitMQ (such as the federation plugin) are controlled by dynamic, cluster-wide parameters. There are 2 kinds of parameters: parameters scoped to a virtual host and global parameters. Each vhost-scoped parameter consists of a component name, a name and a value. The component name and name are strings, and the value is an Erlang term. A global parameter consists of a name and value. The name is a string and the value is an Erlang term. Parameters can be set, cleared and listed. In general you should refer to the documentation for the feature in question to see how to set parameters.
set_parameter
[-p
vhost]
component_name name
valueFor example, this command sets the parameter "node01" for the "federation-upstream" component in the default virtual host to the following JSON "guest":
rabbitmqctl set_parameter
federation-upstream node01
'{"uri":"amqp://user:password@server/%2F","ack-mode":"on-publish"}'
clear_parameter
[-p
vhost]
component_name keyFor example, this command clears the parameter "node01" for the "federation-upstream" component in the default virtual host:
rabbitmqctl clear_parameter
federation-upstream node01
list_parameters
[-p
vhost]For example, this command lists all parameters in the default virtual host:
rabbitmqctl
list_parameters
set_global_parameter
name valueset_parameter
but the key-value pair isn't tied to
a virtual host.
For example, this command sets the global runtime parameter "mqtt_default_vhosts" to the JSON term {"O=client,CN=guest":"/"}:
rabbitmqctl set_global_parameter
mqtt_default_vhosts
'{"O=client,CN=guest":"/"}'
clear_global_parameter
nameclear_parameter
but the key-value pair isn't tied
to a virtual host.
For example, this command clears the global runtime parameter "mqtt_default_vhosts":
rabbitmqctl
clear_global_parameter mqtt_default_vhosts
list_global_parameters
list_parameters
but the global runtime parameters
are not tied to any virtual host.
For example, this command lists all global parameters:
rabbitmqctl
list_global_parameters
Policies are used to control and modify the behaviour of queues and exchanges on a cluster-wide basis. Policies apply within a given vhost, and consist of a name, pattern, definition and an optional priority. Policies can be set, cleared and listed.
set_policy
[-p
vhost]
[--priority
priority]
[--apply-to
apply-to]
name pattern
definitionall ..
For example, this command sets the policy "federate-me" in the default virtual host so that built-in exchanges are federated:
rabbitmqctl set_policy
federate-me ^amq.
'{"federation-upstream-set":"all"}'
clear_policy
[-p
vhost]
nameFor example, this command clears the "federate-me" policy in the default virtual host:
rabbitmqctl clear_policy
federate-me
list_policies
[-p
vhost]For example, this command lists all policies in the default virtual host:
rabbitmqctl
list_policies
set_operator_policy
[-p
vhost]
[--priority
priority]
[--apply-to
apply-to]
name pattern
definitionset_policy
.
Supported arguments are:
clear_operator_policy
[-p
vhost]
nameclear_policy
.list_operator_policies
[-p
vhost]list_policies
.It is possible to enforce certain limits on virtual hosts.
set_vhost_limits
[-p
vhost]
definitionRecognised limits are:
Use a negative value to specify "no limit".
For example, this command limits the max number of concurrent connections in vhost "qa_env" to 64:
rabbitmqctl set_vhost_limits -p
qa_env '{"max-connections": 64}'
This command limits the max number of queues in vhost "qa_env" to 256:
rabbitmqctl set_vhost_limits -p
qa_env '{"max-queues": 256}'
This command clears the max number of connections limit in vhost "qa_env":
rabbitmqctl set_vhost_limits -p
qa_env '{"max-connections": -1}'
This command disables client connections in vhost "qa_env":
rabbitmqctl set_vhost_limits -p
qa_env '{"max-connections": 0}'
clear_vhost_limits
[-p
vhost]For example, this command clears vhost limits in vhost "qa_env":
rabbitmqctl clear_vhost_limits -p
qa_env
list_vhost_limits
[-p
vhost]
[--global
]--global
-p
parameter.The server status queries interrogate the server and return a list
of results with tab-delimited columns. Some queries (
list_queues
, list_exchanges
,
list_bindings
and
list_consumers
) accept an optional
vhost parameter. This parameter, if present, must be
specified immediately after the query.
The list_queues
,
list_exchanges
and
list_bindings
commands accept an optional virtual
host parameter for which to display results. The default value is
"/".
list_queues
[-p
vhost]
[--offline
| --online
|
--local
] [queueinfoitem
...]-p
flag is absent. The
-p
flag can be used to override this default.
Displayed queues can be filtered by their status or location using one of the following mutually exclusive options:
--offline
--online
--local
The queueinfoitem parameter is used to indicate which queue information items to include in the results. The column order in the results will match the order of the parameters. queueinfoitem can take any value from the list that follows:
name
durable
auto_delete
arguments
policy
pid
owner_pid
exclusive
exclusive_consumer_pid
exclusive_consumer_tag
messages_ready
messages_unacknowledged
messages
messages_ready_ram
messages_unacknowledged_ram
messages_ram
messages_persistent
message_bytes
message_bytes_ready
message_bytes
but counting only those
messages ready to be delivered to clients.message_bytes_unacknowledged
message_bytes
but counting only those
messages delivered to clients but not yet acknowledged.message_bytes_ram
message_bytes
but counting only those
messages which are in RAM.message_bytes_persistent
message_bytes
but counting only those
messages which are persistent.head_message_timestamp
disk_reads
disk_writes
consumers
consumer_utilisation
memory
slave_pids
synchronised_slave_pids
state
Queues which are located on cluster nodes that are currently down will be shown with a status of "down" (and most other queueinfoitem will be unavailable).
If no queueinfoitem are specified then queue name and depth are displayed.
For example, this command displays the depth and number of consumers for each queue of the virtual host named "/myvhost"
rabbitmqctl list_queues -p
/myvhost messages consumers
list_exchanges
[-p
vhost]
[exchangeinfoitem ...]-p
flag is absent. The
-p
flag can be used to override this default.
The exchangeinfoitem parameter is used to indicate which exchange information items to include in the results. The column order in the results will match the order of the parameters. exchangeinfoitem can take any value from the list that follows:
name
type
durable
auto_delete
internal
arguments
policy
If no exchangeinfoitem are specified then exchange name and type are displayed.
For example, this command displays the name and type for each exchange of the virtual host named "/myvhost":
rabbitmqctl list_exchanges -p
/myvhost name type
list_bindings
[-p
vhost]
[bindinginfoitem ...]-p
flag can be used
to override this default.
The bindinginfoitem parameter is used to indicate which binding information items to include in the results. The column order in the results will match the order of the parameters. bindinginfoitem can take any value from the list that follows:
source_name
source_kind
destination_name
destination_kind
routing_key
arguments
If no bindinginfoitem are specified then all above items are displayed.
For example, this command displays the exchange name and queue name of the bindings in the virtual host named "/myvhost"
rabbitmqctl list_bindings -p
/myvhost exchange_name queue_name
list_connections
[connectioninfoitem ...]The connectioninfoitem parameter is used to indicate which connection information items to include in the results. The column order in the results will match the order of the parameters. connectioninfoitem can take any value from the list that follows:
pid
name
port
host
peer_port
peer_host
ssl
ssl_protocol
ssl_key_exchange
ssl_cipher
ssl_hash
peer_cert_subject
peer_cert_issuer
peer_cert_validity
state
channels
protocol
Note that if a client requests an AMQP 0-9 connection, we treat it as AMQP 0-9-1.
auth_mechanism
user
vhost
timeout
frame_max
channel_max
client_properties
recv_oct
recv_cnt
send_oct
send_cnt
send_pend
connected_at
If no connectioninfoitem are specified then user, peer host, peer port, time since flow control and memory block state are displayed.
For example, this command displays the send queue size and server port for each connection:
rabbitmqctl list_connections
send_pend port
list_channels
[channelinfoitem ...]The channelinfoitem parameter is used to indicate which channel information items to include in the results. The column order in the results will match the order of the parameters. channelinfoitem can take any value from the list that follows:
pid
connection
name
number
user
vhost
transactional
confirm
consumer_count
messages_unacknowledged
messages_uncommitted
acks_uncommitted
messages_unconfirmed
prefetch_count
global_prefetch_count
If no channelinfoitem are specified then pid, user, consumer_count, and messages_unacknowledged are assumed.
For example, this command displays the connection process and count of unacknowledged messages for each channel:
rabbitmqctl list_channels
connection messages_unacknowledged
list_consumers
[-p
vhost]status
cluster_status
command to find out which nodes are
clustered and running.)
For example, this command displays information about the RabbitMQ broker:
rabbitmqctl status
node_health_check
For example, this command performs a health check on the RabbitMQ node:
rabbitmqctl node_health_check -n
rabbit@stringer
environment
report
For example, this command creates a server report which may be attached to a support request email:
rabbitmqctl report >
server_report.txt
eval
exprFor example, this command returns the name of the node to
which rabbitmqctl
has connected:
rabbitmqctl eval
"node()."
close_connection
connectionpid explanationInstructs the broker to close the connection associated with
the Erlang process id connectionpid (see also the
list_connections
command), passing the
explanation string to the connected client as part
of the AMQP connection shutdown protocol.
For example, this command instructs the RabbitMQ broker to close the connection associated with the Erlang process id "<rabbit@tanto.4262.0>", passing the explanation "go away" to the connected client:
rabbitmqctl close_connection
"<rabbit@tanto.4262.0>" "go away"
close_all_connections
[-p
vhost]
[--global
]
[--per-connection-delay
delay]
[--limit
limit]
explanation-p
vhost--global
is specified.--global
-p
--per-connection-delay
delay--limit
limit--global
is specified.Instructs the broker to close all connections for the specified vhost or entire RabbitMQ node.
For example, this command instructs the RabbitMQ broker to close 10 connections on "qa_env" vhost, passing the explanation "Please close":
rabbitmqctl close_all_connections
-p qa_env --limit 10 'Please close'
This command instructs broker to close all connections to the node:
rabbitmqctl close_all_connections
--global
trace_on
[-p
vhost]Starts tracing. Note that the trace state is not persistent; it will revert to being off if the server is restarted.
trace_off
[-p
vhost]Stops tracing.
set_vm_memory_high_watermark
fractionset_vm_memory_high_watermark
absolute
memory_limitset_disk_free_limit
disk_limitset_disk_free_limit
mem_relative
fractionencode
value passphrase
[--cipher
cipher]
[--hash
hash]
[--iterations
iterations]For example:
rabbitmqctl encode
'<<"guest">>' mypassphrase
--cipher
cipher --hash
hash --iterations
iterationsFor example:
rabbitmqctl encode --cipher
blowfish_cfb64 --hash sha256 --iterations 10000
'<<"guest">>' mypassphrase
decode
value passphrase
[--cipher
cipher]
[--hash
hash]
[--iterations
iterations]For example:
rabbitmqctl decode
'{encrypted, <<"...">>}'
mypassphrase
--cipher
cipher --hash
hash --iterations
iterationsFor example:
rabbitmqctl decode --cipher
blowfish_cfb64 --hash sha256 --iterations 10000
'{encrypted,<<"...">>} mypassphrase
list_hashes
For example, this command instructs the RabbitMQ broker to list all hash functions supported by encoding commands:
rabbitmqctl
list_hashes
list_ciphers
For example, this command instructs the RabbitMQ broker to list all cipher suites supported by encoding commands:
rabbitmqctl
list_ciphers
RabbitMQ plugins can extend rabbitmqctl tool to add new commands
when enabled. Currently available commands can be found in
rabbitmqctl help
output. Following commands are
added by RabbitMQ plugins, available in default distribution:
shovel_status
delete_shovel
[-p
vhost]
namefederation_status
[--only-down
]--only-down
restart_federation_link
link_idlist_amqp10_connections
[amqp10_connectioninfoitem ...]list_connections
command, but
returns fields which make sense for AMQP-1.0 connections.
amqp10_connectioninfoitem parameter is used to
indicate which connection information items to include in the results. The
column order in the results will match the order of the parameters.
amqp10_connectioninfoitem can take any value from
the list that follows:
pid
auth_mechanism
host
frame_max
timeout
user
state
recv_oct
recv_cnt
send_oct
send_cnt
ssl
ssl_protocol
ssl_key_exchange
ssl_cipher
ssl_hash
peer_cert_subject
peer_cert_issuer
peer_cert_validity
node
list_mqtt_connections
[mqtt_connectioninfoitem]list_connections
command, but
returns fields which make sense for MQTT connections.
mqtt_connectioninfoitem parameter is used to
indicate which connection information items to include in the results. The
column order in the results will match the order of the parameters.
mqtt_connectioninfoitem can take any value from the
list that follows:
host
port
peer_host
peer_port
protocol
channels
channel_max
frame_max
client_properties
ssl
ssl_protocol
ssl_key_exchange
ssl_cipher
ssl_hash
conn_name
connection_state
connection
message_id
client_id
clean_sess
will_msg
exchange
ssl_login_name
retainer_pid
user
vhost
list_stomp_connections
[stomp_connectioninfoitem]list_connections
command, but
returns fields which make sense for STOMP connections.
stomp_connectioninfoitem parameter is used to
indicate which connection information items to include in the results. The
column order in the results will match the order of the parameters.
stomp_connectioninfoitem can take any value from the
list that follows:
conn_name
connection
connection_state
session_id
channel
version
implicit_connect
auth_login
auth_mechanism
port
host
peer_port
peer_host
protocol
channels
channel_max
frame_max
client_properties
ssl
ssl_protocol
ssl_key_exchange
ssl_cipher
ssl_hash
reset_stats_db
[--all
]--all
rabbitmq-env.conf(5), rabbitmq-echopid(8), rabbitmq-plugins(8), rabbitmq-server(8), rabbitmq-service(8)
The RabbitMQ Team <info@rabbitmq.com>
April 25, 2017 | RabbitMQ Server |