RABBITMQCTL(8) System Manager's Manual RABBITMQCTL(8) rabbitmqctl - RabbitMQ (SYNOPSIS) [-q] [-s] [-l] [-n node] [-t timeout] command [command_options] (DESCRIPTION) RabbitMQ . RabbitMQ rabbitmq-diagnostics rabbitmq-upgrade . RabbitMQ CLI ( ) . . CLI RabbitMQ: https://www.rabbitmq.com/docs/cli . (OPTIONS) -n node "rabbit@target-hostname" target-hostname . "myserver.example.com " "rabbit@myserver" ( RABBITMQ_NODENAME --longnames ). "hostname -s" "@" . RabbitMQ rabbitmq-server(8) . -q, --quiet (quiet) . . -s, --silent (silent) . . --no-table-headers . --dry-run . . -t timeout, --timeout timeout . . infinity . -l, --longnames (FQDN) . RabbitMQ: https://www.rabbitmq.com/docs/clustering . --erlang-cookie cookie . RABBITMQ_ERLANG_COOKIE . CLI RabbitMQ: https://www.rabbitmq.com/docs/cli . (COMMANDS) help [-l] [command_name] . -l, --list-commands . command_name . version CLI . (Nodes) await_startup RabbitMQ . RabbitMQ: rabbitmqctl await_startup reset RabbitMQ . vhost . reset force_reset RabbitMQ stop_app. RabbitMQ: rabbitmqctl reset rotate_logs RabbitMQ (log rotation) . . (asynchronous) . ( logrotate(8)) . : rabbitmqctl rotate_logs shutdown RabbitMQ (runtime) . runtime . RabbitMQ . (OS PID) ( ) . stop shutdown: o runtime pid_file o RabbitMQ RabbitMQ : rabbitmqctl shutdown start_app RabbitMQ . RabbitMQ reset. RabbitMQ RabbitMQ: rabbitmqctl start_app stop [pid_file] Erlang RabbitMQ . "Running the Server" : https://www.rabbitmq.com/docs/download . pid_file . wait . RabbitMQ : rabbitmqctl stop stop_app RabbitMQ (Erlang VM) . RabbitMQ reset. RabbitMQ RabbitMQ: rabbitmqctl stop_app wait pid_file, wait --pid pid RabbitMQ . RabbitMQ . pidfile pid pid pid --pid RabbitMQ . RabbitMQ . pid erlang --timeout . . pid rabbitmq-server(8) . Mnesia . RABBITMQ_PID_FILE . RabbitMQ : rabbitmqctl wait /var/run/rabbitmq/pid (Cluster management) await_online_nodes count count . RabbitMQ: rabbitmqctl await_online_nodes 2 cluster_status . : rabbitmqctl cluster_status force_boot . RabbitMQ . : . force_boot . . . forget_cluster_node --offline . : rabbitmqctl force_boot force_reset (deprecated) RabbitMQ . force_reset reset . . force_reset (deprecated). Mnesia . Khepri . reset force_reset RabbitMQ stop_app. RabbitMQ: rabbitmqctl force_reset forget_cluster_node [--offline] --offline . . . . --offline. --offline . . ( ) . . "rabbit@stringer" "hare@mcnulty" : rabbitmqctl -n hare@mcnulty forget_cluster_node rabbit@stringer join_cluster seed-node seed-node ( / seed node) . . (reset) . RabbitMQ stop_app. join_cluster RabbitMQ . reset . forget_cluster_node . RabbitMQ: https://www.rabbitmq.com/docs/clustering . (User Management) RabbitMQ . LDAP . add_user username password username . password . RabbitMQ () "janeway" () "changeit" : rabbitmqctl add_user janeway changeit authenticate_user username password username . password . RabbitMQ "janeway" "verifyit" : rabbitmqctl authenticate_user janeway verifyit change_password username newpassword username . newpassword . RabbitMQ "janeway" "newpass" : rabbitmqctl change_password janeway newpass clear_password username username . RabbitMQ "janeway" : rabbitmqctl clear_password janeway ( SASL EXTERNAL ). hash_password plaintext plaintext ( ). . delete_user username username . RabbitMQ "janeway" : rabbitmqctl delete_user janeway list_users . . RabbitMQ : rabbitmqctl list_users set_user_tags username [tag ...] username . tag . . RabbitMQ "janeway" (administrator) : rabbitmqctl set_user_tags janeway administrator ( ) (vhost) . RabbitMQ "janeway" : rabbitmqctl set_user_tags janeway (Access control) clear_permissions [-p vhost] username vhost "/". username . . RabbitMQ "janeway" "my-vhost" : rabbitmqctl clear_permissions -p my-vhost janeway clear_topic_permissions [-p vhost] username [exchange] vhost "/". username . exchange . . RabbitMQ "janeway" "amq.topic" "my-vhost" : rabbitmqctl clear_topic_permissions -p my-vhost janeway amq.topic list_permissions [-p vhost] vhost . "/" . . RabbitMQ "my-vhost" . : rabbitmqctl list_permissions -p my-vhost list_topic_permissions [-p vhost] vhost . "/" . . RabbitMQ "my-vhost" : rabbitmqctl list_topic_permissions -p my-vhost list_user_permissions username username . . RabbitMQ "janeway" : rabbitmqctl list_user_permissions janeway list_user_topic_permissions username username . . RabbitMQ "janeway" : rabbitmqctl list_user_topic_permissions janeway list_vhosts [vhostinfoitem ...] (vhosts) . vhostinfoitem . . vhostinfoitem : name ASCII C. tracing (tracing) . default_queue_type vhost. description . tags . cluster_state : nodedown running stopped. vhostinfoitem vhost . RabbitMQ : rabbitmqctl list_vhosts name tracing set_permissions [-p vhost] user conf write read vhost "/". user . conf (regex) . write . read . . RabbitMQ "janeway" "my-vhost" "janeway-" : rabbitmqctl set_permissions -p my-vhost janeway "^janeway-.*" ".*" ".*" set_permissions_globally username conf write read username . conf . write . read . vhost . RabbitMQ "janeway" "janeway-" : rabbitmqctl set_permissions_globally janeway "^janeway-.*" ".*" ".*" set_topic_permissions [-p vhost] user exchange write read vhost "/". user . exchange . write (routing key) . read . . RabbitMQ "janeway" "amq.topic" "my-vhost" "janeway-" : rabbitmqctl set_topic_permissions -p my-vhost janeway amq.topic "^janeway-.*" "^janeway-.*" : username vhost client_id. client_id MQTT . "^{username}-.*" : rabbitmqctl set_topic_permissions -p my-vhost janeway amq.topic "^{username}-.*" "^{username}-.*" (Monitoring, observability and health checks) environment (application environment) . list_bindings [-p vhost] [bindinginfoitem ...] (bindings) . "/" . -p . bindinginfoitem . . bindinginfoitem : source_name . ASCII C. source_kind . exchange . ASCII C. destination_name . ASCII C. destination_kind . ASCII C. routing_key ASCII C. arguments . bindinginfoitem . "my-vhost" : rabbitmqctl list_bindings -p my-vhost exchange_name queue_name list_channels [channelinfoitem ...] AMQP . AMQP . channelinfoitem . . channelinfoitem : pid Erlang . connection Erlang . name . number . user . vhost . transactional True False . confirm (confirm) True False . consumer_count AMQP . messages_unacknowledged (ack) . messages_uncommitted . acks_uncommitted . messages_unconfirmed . (confirm) . prefetch_count QoS . channelinfoitem pid user consumer_count messages_unacknowledged . : rabbitmqctl list_channels connection messages_unacknowledged list_ciphers (cipher suites) . RabbitMQ : rabbitmqctl list_ciphers list_connections [connectioninfoitem ...] TCP/IP . connectioninfoitem . . connectioninfoitem : pid Erlang . name . port . host DNS IP DNS . peer_port (peer). peer_host DNS IP DNS . ssl SSL . ssl_protocol SSL ( "tlsv1"). ssl_key_exchange SSL ( "rsa"). ssl_cipher SSL ( "aes_256_cbc"). ssl_hash SSL ( "sha"). peer_cert_subject (subject) SSL RFC4514. peer_cert_issuer (issuer) SSL RFC4514. peer_cert_serial_number SSL . peer_cert_validity SSL . state : o starting o tuning o opening o running o flow o blocking o blocked o closing o closed channels . protocol AMQP -- : o {0,9,1} o {0,8,0} AMQP 0-9 AMQP 0-9-1 . auth_mechanism SASL "PLAIN". user . vhost ASCII C. timeout / (heartbeat) . frame_max ( ). channel_max . client_properties . recv_oct . recv_cnt . send_oct . send_cnt . send_pend . connected_at (timestamp). connectioninfoitem user peer host peer port (time since flow control) . : rabbitmqctl list_connections send_pend port list_consumers [-p vhost] . (acknowledgement) ( "none" ) . list_exchanges [-p vhost] [exchangeinfoitem ...] . -p - "/" . -p . exchangeinfoitem . . exchangeinfoitem : name ASCII C. type : o direct o topic o headers o fanout durable . auto_delete . internal . arguments . policy (policy) . exchangeinfoitem . "my-vhost" : rabbitmqctl list_exchanges -p my-vhost name type list_hashes . RabbitMQ : rabbitmqctl list_hashes list_queues [-p vhost] [--offline | --online | --local] [queueinfoitem ...] . -p - "/" . -p . () : --offline ( ). --online ( ) . --local . queueinfoitem . . queueinfoitem : name ASCII C. durable . auto_delete . arguments . policy . operator_policy . effective_policy_definition : . pid Erlang . owner_pid Erlang . . exclusive ( owner_pid ) True False . exclusive_consumer_pid Erlang . . exclusive_consumer_tag . . messages_ready . messages_unacknowledged (ack) . messages ( ). messages_ready_ram messages_ready . messages_unacknowledged_ram messages_unacknowledged . messages_ram . messages_persistent ( / transient ). message_bytes . ( ) (overhead) . message_bytes_ready message_bytes . message_bytes_unacknowledged message_bytes . message_bytes_ram message_bytes . message_bytes_persistent message_bytes . head_message_timestamp . (paged-in) . disk_reads . disk_writes . consumers . consumer_utilisation ( . .) . (prefetch count) . . memory (stack) (heap) . mirror_pids ( / follower replicas) . RabbitMQ: https://www.rabbitmq.com/docs/3.13/ha . synchronised_mirror_pids ( ) . RabbitMQ: https://www.rabbitmq.com/docs/3.13/ha . state . "running" "{syncing, message_count}" . "down" ( queueinfoitem ). type : quorum stream classic. queueinfoitem . "my-vhost" : rabbitmqctl list_queues -p my-vhost messages consumers list_unresponsive_queues [--local] [--queue-timeout seconds] [queueinfoitem ...] [--no-table-headers] . . () : --all . --local . queueinfoitem . . queueinfoitem : name ASCII C. durable . auto_delete . arguments . policy . pid Erlang . recoverable_mirrors Erlang ( ) . type : quorum stream classic. : rabbitmqctl list_unresponsive_queues --local name ping EPMD CLI . : rabbitmqctl ping -n rabbit@hostname report . . : rabbitmqctl report > server_report.txt schema_info [--no-table-headers] [column ...] . : rabbitmqctl schema_info name active_replicas status Erlang RabbitMQ Erlang . ( cluster_status .) RabbitMQ : rabbitmqctl status (Runtime Parameters and Policies) RabbitMQ ( Federation) . : . vhost . JSON . . Erlang . . . (Policies) . . vhost . . clear_global_parameter name . clear_parameter - . name . "mqtt_default_vhosts" : rabbitmqctl clear_global_parameter mqtt_default_vhosts clear_parameter [-p vhost] component_name key . component_name . name . "node01" "federation-upstream" : rabbitmqctl clear_parameter federation-upstream node01 list_global_parameters . list_parameters . : rabbitmqctl list_global_parameters list_parameters [-p vhost] . : rabbitmqctl list_parameters set_global_parameter name value . set_parameter - . name . value JSON. . "mqtt_default_vhosts" JSON {"O=client,CN=guest":"/"} : rabbitmqctl set_global_parameter mqtt_default_vhosts '{"O=client,CN=guest":"/"}' set_parameter [-p vhost] component_name name value . component_name . name . value JSON. . "node01" "federation-upstream" JSON : "guest": rabbitmqctl set_parameter federation-upstream node01 '{"uri":"amqp://user:password@server/%2F","ack-mode":"on-publish"}' list_policies [-p vhost] . : rabbitmqctl list_policies set_operator_policy [-p vhost] [--priority priority] [--apply-to apply-to] name pattern definition (operator policy) . set_policy . : o expires o message-ttl o max-length o max-length-bytes set_policy [-p vhost] [--priority priority] [--apply-to apply-to] name pattern definition . name . pattern (regular expression) . definition JSON. . priority . . 0 . apply-to . : o queues ( streams) o classic_queues ( classic) o quorum_queues ( quorum) o streams ( streams) o exchanges o all all . "federate-me" : rabbitmqctl set_policy federate-me ^amq. '{"federation-upstream-set":"all"}' clear_policy [-p vhost] name . name . "federate-me" : rabbitmqctl clear_policy federate-me clear_operator_policy [-p vhost] name . clear_policy . list_operator_policies [-p vhost] . list_policies . (Virtual hosts) RabbitMQ . . add_vhost vhost [--description desc --tags tags --default-queue-type default-q-type] vhost . desc . tags . default-q-type . : quorum stream. . RabbitMQ "project9_dev_18" : rabbitmqctl add_vhost project9_dev_18 --description 'Dev environment no. 18' --tags dev,project9 clear_vhost_limits [-p vhost] . vhost "qa_env" : rabbitmqctl clear_vhost_limits -p qa_env delete_vhost vhost vhost . . (bindings) . RabbitMQ "test" : rabbitmqctl delete_vhost a-vhost list_vhost_limits [-p vhost] [--global] [--no-table-headers] . --global vhost . -p . restart_vhost [-p vhost] vhost "/". vhost . RabbitMQ "test" : rabbitmqctl restart_vhost test set_vhost_limits [-p vhost] definition . definition JSON. . : o max-connections o max-queues << >> . vhost "qa_env" 64 : rabbitmqctl set_vhost_limits -p qa_env '{"max-connections": 64}' vhost "qa_env" 256 : rabbitmqctl set_vhost_limits -p qa_env '{"max-queues": 256}' vhost "qa_env" : rabbitmqctl set_vhost_limits -p qa_env '{"max-connections": -1}' vhost "qa_env" : rabbitmqctl set_vhost_limits -p qa_env '{"max-connections": 0}' set_user_limits username definition . username definition JSON. . : o max-connections o max-channels << >> . "limited_user" 64 : rabbitmqctl set_user_limits limited_user '{"max-connections": 64}' "limited_user" 16 : rabbitmqctl set_user_limits limited_user '{"max-channels": 16}' "limited_user" : rabbitmqctl set_user_limits limited_user '{"max-connections": 0}' clear_user_limits username limit . username limit "all" . : o max-connections o max-channels "limited_user" : rabbitmqctl clear_user_limits limited_user 'max-connections' "limited_user" : rabbitmqctl clear_user_limits limited_user all trace_off [-p vhost] vhost . . trace_on [-p vhost] vhost . . . (Configuration) decode value passphrase [--cipher cipher] [--hash hash] [--iterations iterations] value passphrase ( encode) . : rabbitmqctl decode '{encrypted, <<"...">>}' mypassphrase --cipher cipher --hash hash --iterations iterations . . : rabbitmqctl decode --cipher blowfish_cfb64 --hash sha256 --iterations 10000 '{encrypted,<<"...">>} mypassphrase encode value passphrase [--cipher cipher] [--hash hash] [--iterations iterations] value passphrase . : rabbitmqctl encode '<<"guest">>' mypassphrase --cipher cipher --hash hash --iterations iterations . . : rabbitmqctl encode --cipher blowfish_cfb64 --hash sha256 --iterations 10000 '<<"guest">>' mypassphrase set_cluster_name name name . federation shovel . . "london" : rabbitmqctl set_cluster_name london set_disk_free_limit disk_limit disk_limit ( vm_memory_high_watermark) 512M 1G. . set_disk_free_limit mem_relative fraction fraction RAM . 1.0 . set_log_level [log_level] (log level) log_level : o debug o info o warning o error o critical o none : rabbitmqctl set_log_level debug set_vm_memory_high_watermark fraction fraction (flow control) 0. set_vm_memory_high_watermark [absolute] memory_limit memory_limit 0 ( 512M 1G). : k, kiB (2^10 ) M, MiB (2^20 ) G, GiB (2^30 ) kB (10^3 ) MB (10^6 ) GB (10^9 ) (Feature flags) enable_feature_flag feature_flag . : rabbitmqctl enable_feature_flag restart_streams "all" : rabbitmqctl enable_feature_flag all list_feature_flags [column ...] column : o name o state o stability o provided_by o desc o doc_url : rabbitmqctl list_feature_flags name state (Connection Operations) close_all_connections [-p vhost] [--global] [--per-connection-delay delay] [--limit limit] explanation -p vhost . --global . --global vhost . -p . --per-connection-delay delay . --limit limit . vhost . --global . explanation . vhost RabbitMQ . RabbitMQ 10 vhost "qa_env" "Please close" : rabbitmqctl close_all_connections -p qa_env --limit 10 'Please close' : rabbitmqctl close_all_connections --global close_connection connectionpid explanation connectionpid Erlang . explanation . Erlang connectionpid ( list_connections ) explanation AMQP . RabbitMQ Erlang "" "go away" : rabbitmqctl close_connection "" "go away" (Misc) eval expression Erlang (Queue Operations) delete_queue queue_name [--if-empty | -e] [--if-unused | -u] queue_name . --if-empty ( ) --if-unused . purge_queue [-p vhost] queue queue . ( ). (PLUGIN COMMANDS) RabbitMQ rabbitmqctl . rabbitmqctl help . RabbitMQ : Shovel (Shovel plugin) shovel_status Shovel delete_shovel [-p vhost] name RabbitMQ shovel name . Federation (Federation plugin) federation_status [--only-down] federation . --only-down federation . restart_federation_link link_id RabbitMQ federation link_id . AMQP 1.0 (AMQP 1.0 plugin) list_amqp10_connections [amqp10_connectioninfoitem ...] list_connections AMQP-1.0 . amqp10_connectioninfoitem . . amqp10_connectioninfoitem : pid Erlang . auth_mechanism SASL "PLAIN". host DNS IP DNS . frame_max (). timeout / (heartbeat) . user . state : o starting o waiting_amqp0100 o securing o running o blocking o blocked o closing o closed recv_oct . recv_cnt . send_oct . send_cnt . ssl SSL . ssl_protocol SSL ( "tlsv1"). ssl_key_exchange SSL ( "rsa"). ssl_cipher SSL ( "aes_256_cbc"). ssl_hash SSL ( "sha"). peer_cert_subject SSL RFC4514. peer_cert_issuer SSL RFC4514. peer_cert_serial_number SSL . peer_cert_validity SSL . node RabbitMQ . MQTT (MQTT plugin) list_mqtt_connections [mqtt_connectioninfoitem] list_connections MQTT . mqtt_connectioninfoitem . . mqtt_connectioninfoitem : host DNS IP DNS . port . peer_host DNS IP DNS . peer_port . protocol MQTT : o {'MQTT', N/A} o {'MQTT', 3.1.0} o {'MQTT', 3.1.1} channels . channel_max . frame_max (). client_properties . ssl SSL . ssl_protocol SSL ( "tlsv1"). ssl_key_exchange SSL ( "rsa"). ssl_cipher SSL ( "aes_256_cbc"). ssl_hash SSL ( "sha"). conn_name . connection_state : o starting o running o blocked connection Erlang amqp. consumer_tags QOS0 QOS1. message_id (Packet ID) . client_id MQTT . clean_sess (clean session) MQTT. will_msg (Will message) MQTT CONNECT. exchange MQTT rabbitmq_mqtt. ssl_login_name SSL retainer_pid Erlang (retain) . user . vhost ASCII C (escaped). decommission_mqtt_node (decommission) . rabbit@stringer : rabbitmqctl decommission_mqtt_node rabbit@stringer STOMP (STOMP plugin) list_stomp_connections [stomp_connectioninfoitem] list_connections STOMP . stomp_connectioninfoitem . . stomp_connectioninfoitem : conn_name . connection Erlang amqp. connection_state : o running o blocking o blocked session_id STOMP channel AMQP version STOMP . implicit_connect ( CONNECT) auth_login . auth_mechanism STOMP. : o config o ssl o stomp_headers port . host DNS IP DNS . peer_port . peer_host DNS IP DNS . protocol STOMP : o {'STOMP', 0} o {'STOMP', 1} o {'STOMP', 2} channels . channel_max . frame_max (). client_properties ssl SSL . ssl_protocol TLS ( "tlsv1"). ssl_key_exchange TLS ( "rsa"). ssl_cipher TLS ( "aes_256_cbc"). ssl_hash SSL ( "sha"). Management agent (Management agent plugin) reset_stats_db [--all] RabbitMQ . --all . (SEE ALSO) rabbitmq-diagnostics(8), rabbitmq-plugins(8), rabbitmq-server(8), rabbitmq-queues(8), rabbitmq-streams(8), rabbitmq-upgrade(8), rabbitmq-service(8), rabbitmq-env.conf(5) (AUTHOR) The RabbitMQ Team RabbitMQ Server June 22, 2023 RabbitMQ Server