diff options
Diffstat (limited to 'deps/rabbit/docs')
-rw-r--r-- | deps/rabbit/docs/README-for-packages | 30 | ||||
-rw-r--r-- | deps/rabbit/docs/README.md | 35 | ||||
-rw-r--r-- | deps/rabbit/docs/advanced.config.example | 109 | ||||
-rw-r--r-- | deps/rabbit/docs/rabbitmq-diagnostics.8 | 725 | ||||
-rw-r--r-- | deps/rabbit/docs/rabbitmq-echopid.8 | 70 | ||||
-rw-r--r-- | deps/rabbit/docs/rabbitmq-env.conf.5 | 86 | ||||
-rw-r--r-- | deps/rabbit/docs/rabbitmq-plugins.8 | 254 | ||||
-rw-r--r-- | deps/rabbit/docs/rabbitmq-queues.8 | 202 | ||||
-rw-r--r-- | deps/rabbit/docs/rabbitmq-server.8 | 98 | ||||
-rw-r--r-- | deps/rabbit/docs/rabbitmq-server.service.example | 27 | ||||
-rw-r--r-- | deps/rabbit/docs/rabbitmq-service.8 | 152 | ||||
-rw-r--r-- | deps/rabbit/docs/rabbitmq-upgrade.8 | 108 | ||||
-rw-r--r-- | deps/rabbit/docs/rabbitmq.conf.example | 1002 | ||||
-rw-r--r-- | deps/rabbit/docs/rabbitmqctl.8 | 2424 | ||||
-rw-r--r-- | deps/rabbit/docs/set_rabbitmq_policy.sh.example | 4 |
15 files changed, 5326 insertions, 0 deletions
diff --git a/deps/rabbit/docs/README-for-packages b/deps/rabbit/docs/README-for-packages new file mode 100644 index 0000000000..f507a74054 --- /dev/null +++ b/deps/rabbit/docs/README-for-packages @@ -0,0 +1,30 @@ +This is rabbitmq-server, a message broker implementing AMQP 0-9-1, AMQP 1.0, +STOMP and MQTT. + +Most of the documentation for RabbitMQ is provided on the RabbitMQ web +site. You can see documentation for the current version at + +https://www.rabbitmq.com/documentation.html + +and for previous versions at + +https://www.rabbitmq.com/previous.html + +Man pages are installed with this package. Of particular interest are +rabbitmqctl(8), rabbitmq-diagnostics(8), rabbitmq-queues(8). +They interact with a running node. rabbitmq-plugins(8) is used to manage plugins. +All of these should be run as the superuser. Learn more about +CLI tools at + +https://www.rabbitmq.com/cli.html + +An example configuration file is provided in the same directory as +this README. Copy it to /etc/rabbitmq/rabbitmq.conf to use it. The +RabbitMQ server must be restarted after changing the configuration +file. Learn more about configuration at + +https://www.rabbitmq.com/configure.html + +An example policy file for HA queues is provided in the same directory +as this README. Copy and chmod +x it to +/usr/local/sbin/set_rabbitmq_policy to use it with the Pacemaker OCF RA. diff --git a/deps/rabbit/docs/README.md b/deps/rabbit/docs/README.md new file mode 100644 index 0000000000..dba1983378 --- /dev/null +++ b/deps/rabbit/docs/README.md @@ -0,0 +1,35 @@ +# Manual Pages and Documentation Extras + +This directory contains [CLI tool](https://rabbitmq.com/cli.html) man page sources as well as a few documentation extras: + + * An [annotated rabbitmq.conf example](./rabbitmq.conf.example) (see [new style configuration format](https://www.rabbitmq.com/configure.html#config-file-formats)) + * An [annotated advanced.config example](./advanced.config.example) (see [The advanced.config file](https://www.rabbitmq.com/configure.html#advanced-config-file)) + * A [systemd unit file example](./rabbitmq-server.service.example) + +Please [see rabbitmq.com](https://rabbitmq.com/documentation.html) for documentation guides. + + +## Classic Config File Format Example + +Feeling nostalgic and looking for the [classic configuration file example](https://github.com/rabbitmq/rabbitmq-server/blob/v3.7.x/docs/rabbitmq.config.example)? +Now that's old school! Keep in mind that classic configuration file **should be considered deprecated**. +Prefer `rabbitmq.conf` (see [new style configuration format](https://www.rabbitmq.com/configure.html#config-file-formats)) +with an `advanced.config` to complement it as needed. + + +## man Pages + +### Source Files + +This directory contains man pages that are are converted to HTML using `mandoc`: + + gmake web-manpages + +The result is then copied to the [website repository](https://github.com/rabbitmq/rabbitmq-website/tree/live/site/man) + +### Contributions + +Since deployed man pages are generated, it is important to keep them in sync with the source. +Accepting community contributions — which will always come as website pull requests — +is fine but the person who merges them is responsible for backporting all changes +to the source pages in this repo. diff --git a/deps/rabbit/docs/advanced.config.example b/deps/rabbit/docs/advanced.config.example new file mode 100644 index 0000000000..dc5ab8fc0c --- /dev/null +++ b/deps/rabbit/docs/advanced.config.example @@ -0,0 +1,109 @@ +[ + + + %% ---------------------------------------------------------------------------- + %% Advanced Erlang Networking/Clustering Options. + %% + %% See https://www.rabbitmq.com/clustering.html for details + %% ---------------------------------------------------------------------------- + %% Sets the net_kernel tick time. + %% Please see http://erlang.org/doc/man/kernel_app.html and + %% https://www.rabbitmq.com/nettick.html for further details. + %% + %% {kernel, [{net_ticktime, 60}]}, + %% ---------------------------------------------------------------------------- + %% RabbitMQ Shovel Plugin + %% + %% See https://www.rabbitmq.com/shovel.html for details + %% ---------------------------------------------------------------------------- + + {rabbitmq_shovel, + [{shovels, + [%% A named shovel worker. + %% {my_first_shovel, + %% [ + + %% List the source broker(s) from which to consume. + %% + %% {sources, + %% [%% URI(s) and pre-declarations for all source broker(s). + %% {brokers, ["amqp://user:password@host.domain/my_vhost"]}, + %% {declarations, []} + %% ]}, + + %% List the destination broker(s) to publish to. + %% {destinations, + %% [%% A singular version of the 'brokers' element. + %% {broker, "amqp://"}, + %% {declarations, []} + %% ]}, + + %% Name of the queue to shovel messages from. + %% + %% {queue, <<"your-queue-name-goes-here">>}, + + %% Optional prefetch count. + %% + %% {prefetch_count, 10}, + + %% when to acknowledge messages: + %% - no_ack: never (auto) + %% - on_publish: after each message is republished + %% - on_confirm: when the destination broker confirms receipt + %% + %% {ack_mode, on_confirm}, + + %% Overwrite fields of the outbound basic.publish. + %% + %% {publish_fields, [{exchange, <<"my_exchange">>}, + %% {routing_key, <<"from_shovel">>}]}, + + %% Static list of basic.properties to set on re-publication. + %% + %% {publish_properties, [{delivery_mode, 2}]}, + + %% The number of seconds to wait before attempting to + %% reconnect in the event of a connection failure. + %% + %% {reconnect_delay, 2.5} + + %% ]} %% End of my_first_shovel + ]} + %% Rather than specifying some values per-shovel, you can specify + %% them for all shovels here. + %% + %% {defaults, [{prefetch_count, 0}, + %% {ack_mode, on_confirm}, + %% {publish_fields, []}, + %% {publish_properties, [{delivery_mode, 2}]}, + %% {reconnect_delay, 2.5}]} + ]}, + + {rabbitmq_auth_backend_ldap, [ + %% + %% Authorisation + %% ============= + %% + + %% The LDAP plugin can perform a variety of queries against your + %% LDAP server to determine questions of authorisation. See + %% https://www.rabbitmq.com/ldap.html#authorisation for more + %% information. + + %% Set the query to use when determining vhost access + %% + %% {vhost_access_query, {in_group, + %% "ou=${vhost}-users,ou=vhosts,dc=example,dc=com"}}, + + %% Set the query to use when determining resource (e.g., queue) access + %% + %% {resource_access_query, {constant, true}}, + + %% Set queries to determine which tags a user has + %% + %% {tag_queries, []} + ]} +]. + + + diff --git a/deps/rabbit/docs/rabbitmq-diagnostics.8 b/deps/rabbit/docs/rabbitmq-diagnostics.8 new file mode 100644 index 0000000000..7a6d53d097 --- /dev/null +++ b/deps/rabbit/docs/rabbitmq-diagnostics.8 @@ -0,0 +1,725 @@ +.\" vim:ft=nroff: +.\" This Source Code Form is subject to the terms of the Mozilla Public +.\" 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/. +.\" +.\" Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. +.\" +.Dd September 28, 2019 +.Dt RABBITMQ-DIAGNOSTICS 8 +.Os "RabbitMQ Server" +.Sh NAME +.Nm rabbitmq-diagnostics +.Nd RabbitMQ diagnostics, monitoring and health checks 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 for diagnostics, monitoring +and health checks of RabbitMQ nodes. +See the +.Lk https://rabbitmq.com/documentation.html "RabbitMQ documentation guides" +to learn more about RabbitMQ diagnostics, monitoring and health checks. + +.Nm +allows the operator to inspect node and cluster state. A number of +health checks are available to be used interactively and by monitoring tools. + +.Pp +By default if it is not possible to connect to and authenticate with the target node +(for example if it is stopped), the operation will fail. +To learn more, see the +.Lk https://rabbitmq.com/monitoring.html "RabbitMQ Monitoring guide" +. +.\" ------------------------------------------------------------------ +.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 +.Lk https://rabbitmq.com/clustering.html "RabbitMQ Clustering guide" +.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 +.Lk https://rabbitmq.com/cli.html "RabbitMQ CLI Tools guide" +.El +.\" ------------------------------------------------------------------ +.Sh COMMANDS +.\" ------------------------------------ +.Pp +Most commands provided by +.Nm +inspect node and cluster state or perform health checks. +.Pp +Commands that list topology entities (e.g. queues) use tab as column delimiter. +These commands and their arguments are delegated to rabbitmqctl(8). +.Pp +Some commands ( +.Cm list_queues , +.Cm list_exchanges , +.Cm list_bindings +and +.Cm list_consumers ) +accept an optional +.Ar vhost +parameter. +.Pp +The +.Cm list_queues , +.Cm list_exchanges +and +.Cm list_bindings +commands accept an optional virtual host parameter for which to display +results. +The default value is +.Qq / . +.El +.Ss Help +.Bl -tag -width Ds +.\" ------------------------------------ +.Bl -tag -width Ds +.It Cm help Oo Fl l Oc Op Ar command_name +.Pp +Prints usage for all available commands. +.Bl -tag -width Ds +.It Fl l , Fl -list-commands +List command usages only, without parameter explanation. +.It Ar command_name +Prints usage for the specified command. +.El +.\" ------------------------------------ +.It Cm version +.Pp +Displays CLI tools version +.El +.Ss Nodes +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm wait +.Pp +See +.Cm wait +in +.Xr rabbitmqctl 8 +.El +.Ss Cluster +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm cluster_status +.Pp +See +.Cm cluster_status +in +.Xr rabbitmqctl 8 +.El +.Ss Users +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm list_users +.Pp +See +.Cm list_users +in +.Xr rabbitmqctl 8 +.El +.Ss Access Control +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm list_permissions Op Fl p Ar vhost +.Pp +See +.Cm list_permissions +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_topic_permissions Op Fl p Ar vhost +.Pp +See +.Cm list_topic_permissions +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_user_permissions Ar username +.Pp +See +.Cm list_user_permissions +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_user_topic_permissions Ar username +.Pp +See +.Cm list_user_topic_permissions +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_vhosts Op Ar vhostinfoitem ... +.Pp +See +.Cm list_vhosts +in +.Xr rabbitmqctl 8 +.El +.Ss Monitoring, observability and health checks +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm alarms +.Pp +Lists resource alarms, if any, in the cluster. +.Pp +See +.Lk https://rabbitmq.com/alarms.html "RabbitMQ Resource Alarms guide" +to learn more. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics alarms +.\" ------------------------------------ +.It Cm certificates +.Pp +Displays the node certificates for every listener on target node that is configured to use TLS. +.Pp +Example: +.sp +.Dl rabbitmq-diagnostics certificates +.\" ------------------------------------ +.It Cm check_alarms +.Pp +Health check that fails (returns with a non-zero code) if there are alarms +in effect on any of the cluster nodes. +.Pp +See +.Lk https://rabbitmq.com/alarms.html "RabbitMQ Resource Alarms guide" +to learn more. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics check_alarms +.\" ------------------------------------ +.It Cm check_certificate_expiration Oo Fl -unit Ar time_unit Oc Op Fl -within Ar seconds +.Pp +Checks the expiration date on the certificates for every listener on target node that is configured to use TLS. +Supported time units are: +.Bl -bullet +.It +days +.It +weeks +.It +months +.It +years +.El +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics check_certificate_expiration --unit weeks --within 6 +.\" ------------------------------------ +.It Cm check_local_alarms +.Pp +Health check that fails (returns with a non-zero code) if there are alarms +in effect on the target node. +.Pp +See +.Lk https://rabbitmq.com/alarms.html "RabbitMQ Resource Alarms guide" +to learn more. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics check_local_alarms +.\" ------------------------------------ +.It Cm check_port_connectivity +.Pp +Health check that fails (returns with a non-zero code) if any listener ports +on the target node cannot accept a new TCP connection opened by +.Nm +.Pp +The check only validates if a new TCP connection is accepted. It does not +perform messaging protocol handshake or authenticate. +.Pp +See +.Lk https://rabbitmq.com/networking.html "RabbitMQ Networking guide" +to learn more. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics check_port_connectivity +.\" ------------------------------------ +.It Cm check_port_listener Ar port +.Pp +Health check that fails (returns with a non-zero code) if the target node +is not listening on the specified port (there is no listener that +uses that port). +.Pp +See +.Lk https://rabbitmq.com/networking.html "RabbitMQ Networking guide" +to learn more. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics check_port_listener 5672 +.\" ------------------------------------ +.It Cm check_protocol_listener Ar protocol +.Pp +Health check that fails (returns with a non-zero code) if the target node +does not have a listener for the specified protocol. +.Pp +See +.Lk https://rabbitmq.com/networking.html "RabbitMQ Networking guide" +to learn more. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics check_protocol_listener mqtt +.\" ------------------------------------ +.It Cm check_running +.Pp +Health check that fails (returns with a non-zero code) if the RabbitMQ +application is not running on the target node. +.Pp +If +.Cm rabbitmqctl(8) +was used to stop the application, this check will fail. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics check_running +.\" ------------------------------------ +.It Cm check_virtual_hosts +.Pp +Health check that checks if all vhosts are running in the target node +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics check_virtual_hosts --timeout 60 +.\" ------------------------------------ +.It Cm cipher_suites +.Pp +Lists cipher suites enabled by default. To list all available cipher suites, add the --all argument. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics cipher_suites --format openssl --all +.\" ------------------------------------ +.It Cm command_line_arguments +.Pp +Displays target node's command-line arguments and flags as reported by the runtime. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics command_line_arguments -n rabbit@hostname +.\" ------------------------------------ +.It Cm consume_event_stream Oo Fl -duration Ar seconds | Fl d Ar seconds Oc Oo Fl -pattern Ar pattern Oc Op Fl -timeout Ar milliseconds +.Pp +Streams internal events from a running node. Output is jq-compatible. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics consume_event_stream -n rabbit@hostname --duration 20 --pattern "queue_.*" +.\" ------------------------------------ +.It Cm discover_peers +.Pp +Runs a peer discovery on the target node and prints the discovered nodes, if any. +.Pp +See +.Lk https://rabbitmq.com/cluster-formation.html "RabbitMQ Cluster Formation guide" +to learn more. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics discover_peers --timeout 60 +.\" ------------------------------------ +.It Cm environment +See +.Cm environment +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm erlang_cookie_hash +.Pp +Outputs a hashed value of the shared secret used by the target node +to authenticate CLI tools and peers. The value can be compared with the hash +found in error messages of CLI tools. +.Pp +See +.Lk https://rabbitmq.com/clustering.html#erlang-cookie "RabbitMQ Clustering guide" +to learn more. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics erlang_cookie_hash -q +.\" ------------------------------------ +.It Cm erlang_version +.Pp +Reports target node's Erlang/OTP version. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics erlang_version -q +.\" ------------------------------------ +.It Cm is_booting +.Pp +Reports if RabbitMQ application is currently booting (not booted/running or stopped) on +the target node. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics is_booting +.\" ------------------------------------ +.It Cm is_running +.Pp +Reports if RabbitMQ application is fully booted and running (that is, not stopped) on +the target node. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics is_running +.\" ------------------------------------ +.It Cm list_bindings Oo Fl p Ar vhost Oc Op Ar bindinginfoitem ... +.Pp +See +.Cm list_bindings +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_channels Op Ar channelinfoitem ... +.Pp +See +.Cm list_channels +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_ciphers +.Pp +See +.Cm list_ciphers +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_connections Op Ar connectioninfoitem ... +.Pp +See +.Cm list_connections +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_consumers Op Fl p Ar vhost +.Pp +See +.Cm list_consumers +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_exchanges Oo Fl p Ar vhost Oc Op Ar exchangeinfoitem ... +.Pp +See +.Cm list_exchanges +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_hashes +.Pp +See +.Cm list_hashes +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_queues Oo Fl p Ar vhost Oc Oo Fl -offline | Fl -online | Fl -local Oc Op Ar queueinfoitem ... +.Pp +See +.Cm list_queues +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_unresponsive_queues Oc Oo Fl -local Oc Oo Fl -queue-timeout Ar milliseconds Oc Oo Ar column ... Oc Op Fl -no-table-headers +.Pp +See +.Cm list_unresponsive_queues +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm listeners +.Pp +Lists listeners (bound sockets) on this node. Use this to inspect +what protocols and ports the node is listening on for client, CLI tool +and peer connections. +.Pp +See +.Lk https://rabbitmq.com/networking.html "RabbitMQ Networking guide" +to learn more. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics listeners +.\" ------------------------------------ +.It Cm log_tail Fl -number Ar number | Fl N Ar number Op Fl -timeout Ar milliseconds +.Pp +Prints the last N lines of the log on the node +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics log_tail -number 100 +.\" ------------------------------------ +.It Cm log_tail_stream Oo Fl -duration Ar seconds | Fl d Ar seconds Oc Op Fl -timeout Ar milliseconds +.Pp +Streams logs from a running node for a period of time +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics log_tail_stream --duration 60 +.\" ------------------------------------ +.It Cm maybe_stuck +.Pp +Periodically samples stack traces of all Erlang processes +("lightweight threads") on the node. Reports the processes for which +stack trace samples are identical. +.Pp +Identical samples may indicate that the process is not making any progress +but is not necessarily an indication of a problem. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics maybe_stuck -q +.\" ------------------------------------ +.It Cm memory_breakdown Op Fl -unit Ar memory_unit +.Pp +Displays node's memory usage by category. +Supported memory units are: +.Bl -bullet +.It +bytes +.It +megabytes +.It +gigabytes +.It +terabytes +.El +.Pp +See +.Lk https://rabbitmq.com/memory-use.html "RabbitMQ Memory Use guide" +to learn more. +.Pp +Example: +.sp +.Dl rabbitmq-diagnostics memory_breakdown --unit gigabytes +.\" ------------------------------------ +.It Cm observer Op Fl -interval Ar seconds +.Pp +Starts a CLI observer interface on the target node +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics observer --interval 10 +.\" ------------------------------------ +.It Cm ping +.Pp +Most basic health check. Succeeds if target node (runtime) is running +and +.Nm +can authenticate with it successfully. +.\" ------------------------------------ +.It Cm report +.Pp +See +.Cm report +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm runtime_thread_stats Op Fl -sample-interval Ar interval +.Pp +Performs sampling of runtime (kernel) threads' activity for +.Ar interval +seconds and reports it. +.Pp +For this command to work, Erlang/OTP on the target node must be compiled with +microstate accounting support and have the runtime_tools package available. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics runtime_thread_stats --sample-interval 15 +.\" ------------------------------------ +.It Cm schema_info Oo Fl -no_table_headers Oc Oo Ar column ... Oc Op Fl -timeout Ar milliseconds +.Pp +See +.Cm schema_info +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm server_version +.Pp +Reports target node's version. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics server_version -q +.\" ------------------------------------ +.It Cm status +.Pp +See +.Cm status +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm tls_versions +.Pp +Lists all TLS versions supported by the runtime on the target node. +Note that RabbitMQ can be configured to only accept a subset of those +versions, for example, SSLv3 is disabled by default. +.Pp +See +.Lk https://rabbitmq.com/ssl.html "RabbitMQ TLS guide" +to learn more. +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics tls_versions -q +.El +.Ss Parameters +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm list_global_parameters +.Pp +See +.Cm list_global_parameters +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_parameters Op Fl p Ar vhost +.Pp +See +.Cm list_parameters +in +.Xr rabbitmqctl 8 +.El +.Ss Policies +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm list_operator_policies Op Fl p Ar vhost +.Pp +See +.Cm list_operator_policies +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.It Cm list_policies Op Fl p Ar vhost +.Pp +See +.Cm list_policies +in +.Xr rabbitmqctl 8 +.\" ------------------------------------ +.El +.Ss Virtual hosts +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm list_vhost_limits Oo Fl -vhost Ar vhost Oc Oo Fl -global Oc Op Fl -no-table-headers +.Pp +See +.Cm list_vhost_limits +in +.Xr rabbitmqctl 8 +.El +.Ss Node configuration +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm log_location Oo Fl -all | Fl a Oc Op Fl -timeout Ar milliseconds +.Pp +Shows log file location(s) on target node +.Pp +Example: +.Sp +.Dl rabbitmq-diagnostics log_location -a +.El +.Ss Feature flags +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm list_feature_flags Oo Ar column ... Oc Op Fl -timeout Ar milliseconds +.Pp +See +.Cm list_feature_flags +in +.Xr rabbitmqctl 8 +.El +.Ss Queues +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm quorum_status Ar queue Op Fl -vhost Ar vhost +.Pp +See +.Cm quorum_status +in +.Xr rabbitmq-queues 8 +.It Cm check_if_node_is_mirror_sync_critical +.Pp +See +.Cm check_if_node_is_mirror_sync_critical +in +.Xr rabbitmq-queues 8 +.It Cm check_if_node_is_quorum_critical +.Pp +See +.Cm check_if_node_is_quorum_critical +in +.Xr rabbitmq-queues 8 +.\" ------------------------------------------------------------------ +.Sh SEE ALSO +.\" ------------------------------------------------------------------ +.Xr rabbitmqctl 8 , +.Xr rabbitmq-server 8 , +.Xr rabbitmq-queues 8 , +.Xr rabbitmq-upgrade 8 , +.Xr rabbitmq-service 8 , +.Xr rabbitmq-env.conf 5 , +.Xr rabbitmq-echopid 8 +.\" ------------------------------------------------------------------ +.Sh AUTHOR +.\" ------------------------------------------------------------------ +.An The RabbitMQ Team Aq Mt info@rabbitmq.com diff --git a/deps/rabbit/docs/rabbitmq-echopid.8 b/deps/rabbit/docs/rabbitmq-echopid.8 new file mode 100644 index 0000000000..f51dab854c --- /dev/null +++ b/deps/rabbit/docs/rabbitmq-echopid.8 @@ -0,0 +1,70 @@ +.\" vim:ft=nroff: +.\" This Source Code Form is subject to the terms of the Mozilla Public +.\" 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/. +.\" +.\" Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. +.\" +.Dd September 28, 2019 +.Dt RABBITMQ-ECHOPID.BAT 8 +.Os "RabbitMQ Server" +.Sh NAME +.Nm rabbitmq-echopid.bat +.Nd returns the Windows process id of the Erlang runtime running RabbitMQ +.\" ------------------------------------------------------------------ +.Sh SYNOPSIS +.\" ------------------------------------------------------------------ +.Nm +.Ar sname +.\" ------------------------------------------------------------------ +.Sh DESCRIPTION +.\" ------------------------------------------------------------------ +RabbitMQ is an open source multi-protocol messaging broker. +.Pp +Running +.Nm +will attempt to discover and echo the process id (PID) of the Erlang +runtime process +.Pq Pa erl.exe +that is hosting RabbitMQ. +To allow +.Pa erl.exe +time to start up and load RabbitMQ, the script will wait for ten seconds +before timing out if a suitable PID cannot be found. +.Pp +If a PID is discovered, the script will echo it to stdout +before exiting with a +.Ev ERRORLEVEL +of 0. +If no PID is discovered before the timeout, nothing is written to stdout +and the script exits setting +.Ev ERRORLEVEL +to 1. +.Pp +Note that this script only exists on Windows due to the need to wait for +.Pa erl.exe +and possibly time-out. +To obtain the PID on Unix set +.Ev RABBITMQ_PID_FILE +before starting +.Xr rabbitmq-server 8 +and do not use +.Fl detached . +.\" ------------------------------------------------------------------ +.Sh OPTIONS +.\" ------------------------------------------------------------------ +.Bl -tag -width Ds +.It Ar sname +The short-name form of the RabbitMQ node name. +.El +.\" ------------------------------------------------------------------ +.Sh SEE ALSO +.\" ------------------------------------------------------------------ +.Xr rabbitmq-plugins 8 , +.Xr rabbitmq-server 8 , +.Xr rabbitmq-service 8 , +.Xr rabbitmqctl 8 +.\" ------------------------------------------------------------------ +.Sh AUTHOR +.\" ------------------------------------------------------------------ +.An The RabbitMQ Team Aq Mt info@rabbitmq.com diff --git a/deps/rabbit/docs/rabbitmq-env.conf.5 b/deps/rabbit/docs/rabbitmq-env.conf.5 new file mode 100644 index 0000000000..b1bb26281b --- /dev/null +++ b/deps/rabbit/docs/rabbitmq-env.conf.5 @@ -0,0 +1,86 @@ +.\" vim:ft=nroff: +.\" This Source Code Form is subject to the terms of the Mozilla Public +.\" 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/. +.\" +.\" Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. +.\" +.Dd September 28, 2019 +.Dt RABBITMQ-ENV.CONF 5 +.Os "RabbitMQ Server" +.Sh NAME +.Nm rabbitmq-env.conf +.Nd environment variables used by RabbitMQ server +.\" ------------------------------------------------------------------ +.Sh DESCRIPTION +.\" ------------------------------------------------------------------ +.Nm +contains environment variables that override the defaults built in to the +RabbitMQ scripts and CLI tools. +.Pp +The file is interpreted by the system shell, and so should consist of a +sequence of shell environment variable definitions. +Normal shell syntax is permitted (since the file is sourced using the +shell "." operator), including line comments starting with "#". +.Pp +In order of preference, the startup scripts get their values from the +environment, from +.Nm +and finally from the built-in default values. +For example, for the +.Ev RABBITMQ_NODENAME +setting, +.Ev RABBITMQ_NODENAME +from the environment is checked first. +If it is absent or equal to the empty string, then +.Ev NODENAME +from +.Nm +is checked. +If it is also absent or set equal to the empty string then the default +value from the startup script is used. +.Pp +The variable names in +.Nm +are always equal to the environment variable names, with the +.Qq RABBITMQ_ +prefix removed: +.Ev RABBITMQ_NODE_PORT +from the environment becomes +.Ev NODE_PORT +in +.Nm . +.\" ------------------------------------------------------------------ +.Sh EXAMPLES +.\" ------------------------------------------------------------------ +Below is an example of a minimalistic +.Nm +file that overrides the default node name prefix from "rabbit" to +"hare". +.sp +.Dl # I am a complete rabbitmq-env.conf file. +.Dl # Comment lines start with a hash character. +.Dl # This is a /bin/sh script file - use ordinary envt var syntax +.Dl NODENAME=hare + +In the below +.Nm +file RabbitMQ configuration file location is changed to "/data/services/rabbitmq/rabbitmq.conf". +.sp +.Dl # I am a complete rabbitmq-env.conf file. +.Dl # Comment lines start with a hash character. +.Dl # This is a /bin/sh script file - use ordinary envt var syntax +.Dl CONFIG_FILE=/data/services/rabbitmq/rabbitmq.conf +.\" ------------------------------------------------------------------ +.Sh SEE ALSO +.\" ------------------------------------------------------------------ +.Xr rabbitmq-echopid 8 , +.Xr rabbitmq-plugins 8 , +.Xr rabbitmq-server 8 , +.Xr rabbitmq-queues 8 , +.Xr rabbitmq-upgrade 8 , +.Xr rabbitmqctl 8 +.\" ------------------------------------------------------------------ +.Sh AUTHOR +.\" ------------------------------------------------------------------ +.An The RabbitMQ Team Aq Mt info@rabbitmq.com diff --git a/deps/rabbit/docs/rabbitmq-plugins.8 b/deps/rabbit/docs/rabbitmq-plugins.8 new file mode 100644 index 0000000000..4cec8cfded --- /dev/null +++ b/deps/rabbit/docs/rabbitmq-plugins.8 @@ -0,0 +1,254 @@ +.\" vim:ft=nroff: +.\" This Source Code Form is subject to the terms of the Mozilla Public +.\" 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/. +.\" +.\" Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. +.\" +.Dd September 28, 2019 +.Dt RABBITMQ-PLUGINS 8 +.Os "RabbitMQ Server" +.Sh NAME +.Nm rabbitmq-plugins +.Nd command line tool for managing RabbitMQ plugins +.\" ------------------------------------------------------------------ +.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 for managing RabbitMQ plugins. +See the +.Lk https://www.rabbitmq.com/plugins.html "RabbitMQ Plugins guide" +for an overview of RabbitMQ plugins and how they are used. + +.Nm +allows the operator to enable, disable and inspect plugins. +It must be run by a user with write permissions to the RabbitMQ +configuration directory. +.Pp +Plugins can depend on other plugins. +.Nm +resolves the dependencies and enables or disables all dependencies +so that the user doesn't have to manage them explicitly. +Plugins listed on the +.Nm +command line are marked as explicitly enabled; dependent plugins are +marked as implicitly enabled. +Implicitly enabled plugins are automatically disabled again when they +are no longer required. +.Pp +The +.Cm enable , +.Cm disable , +and +.Cm set +commands will update the plugins file and then attempt to connect to the +broker and ensure it is running all enabled plugins. +By default if it is not possible to connect to and authenticate with the target node +(for example if it is stopped), the operation will fail. +If +.Nm +is used on the same host as the target node, +.Fl -offline +can be specified to make +.Nm +resolve and update plugin state directly (without contacting the node). +Such changes will only have an effect on next node start. +To learn more, see the +.Lk https://www.rabbitmq.com/plugins.html "RabbitMQ Plugins guide" +. +.\" ------------------------------------------------------------------ +.Sh OPTIONS +.\" ------------------------------------------------------------------ +.Bl -tag -width Ds +.It Fl n Ar node +Default node is +.Qq Ar rabbit@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 +.Lk https://www.rabbitmq.com/clustering.html "RabbitMQ Clustering guide" +.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 +.Lk https://www.rabbitmq.com/cli.html "RabbitMQ CLI Tools guide" +.El +.\" ------------------------------------------------------------------ +.Sh COMMANDS +.\" ------------------------------------------------------------------ +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm list Oo Fl Eemv Oc Op Ar pattern +.Bl -tag -width Ds +.It Fl E +Show only explicitly enabled plugins. +.It Fl e +Show only explicitly or implicitly enabled plugins. +.It Fl m +Show only plugin names (minimal). +.It Fl v +Show all plugin details (verbose). +.It Ar pattern +Pattern to filter the plugin names by. +.El +.Pp +Lists all plugins, their versions, dependencies and descriptions. +Each plugin is prefixed with two status indicator characters inside [ ]. +The first indicator can be: +.Bl -tag -width <space> -compact +.It Sy <space> +to indicate that the plugin is not enabled +.It Sy E +to indicate that it is explicitly enabled +.It Sy e +to indicate that it is implicitly enabled +.It Sy \! +to indicate that it is enabled but missing and thus not operational +.El +.Pp +The second indicator can be: +.Bl -tag -width <space> -compact +.It Sy <space> +to show that the plugin is not running +.It Sy * +to show that it is +.El +.Pp +If the optional pattern is given, only plugins whose name matches +.Ar pattern +are shown. +.Pp +For example, this command lists all plugins, on one line each +.sp +.Dl rabbitmq-plugins list +.Pp +This command lists all plugins: +.sp +.Dl rabbitmq-plugins list -v +.Pp +This command lists all plugins whose name contains "management". +.sp +.Dl rabbitmq-plugins list -v management +.Pp +This command lists all implicitly or explicitly enabled RabbitMQ plugins. +.sp +.Dl rabbitmq-plugins list -e rabbit +.\" ------------------------------------ +.It Cm enable Oo Fl -offline Oc Oo Fl -online Oc Ar plugin ... +.Bl -tag -width Ds +.It Fl -offline +Modify node's enabled plugin state directly without contacting the node. +.It Fl -online +Treat a failure to connect to the running broker as fatal. +.It Ar plugin +One or more plugins to enable. +.El +.Pp +Enables the specified plugins and all their dependencies. +.Pp +For example, this command enables the +.Qq shovel +and +.Qq management +plugins and all their dependencies: +.sp +.Dl rabbitmq\-plugins enable rabbitmq_shovel rabbitmq_management +.\" ------------------------------------ +.It Cm disable Oo Fl -offline Oc Oo Fl -online Oc Ar plugin ... +.Bl -tag -width Ds +.It Fl -offline +Modify node's enabled plugin state directly without contacting the node. +.It Fl -online +Treat a failure to connect to the running broker as fatal. +.It Ar plugin +One or more plugins to disable. +.El +.Pp +Disables the specified plugins and all their dependencies. +.Pp +For example, this command disables +.Qq rabbitmq_management +and all plugins that depend on it: +.sp +.Dl rabbitmq-plugins disable rabbitmq_management +.\" ------------------------------------ +.It Cm set Oo Fl -offline Oc Oo Fl -online Oc Op Ar plugin ... +.Bl -tag -width Ds +.It Fl -offline +Modify node's enabled plugin state directly without contacting the node. +.It Fl -online +Treat a failure to connect to the running broker as fatal. +.It Ar plugin +Zero or more plugins to disable. +.El +.Pp +Enables the specified plugins and all their dependencies. +Unlike +.Cm enable , +this command ignores and overwrites any existing enabled plugins. +.Cm set +with no plugin arguments is a legal command meaning "disable all plugins". +.Pp +For example, this command enables the +.Qq management +plugin and its dependencies and disables everything else: +.sp +.Dl rabbitmq-plugins set rabbitmq_management +.El +.\" ------------------------------------------------------------------ +.Sh SEE ALSO +.\" ------------------------------------------------------------------ +.Xr rabbitmqctl 8 , +.Xr rabbitmq-diagnostics 8 , +.Xr rabbitmq-server 8 , +.Xr rabbitmq-queues 8 , +.Xr rabbitmq-upgrade 8 , +.Xr rabbitmq-service 8 , +.Xr rabbitmq-env.conf 5 , +.Xr rabbitmq-echopid 8 +.\" ------------------------------------------------------------------ +.Sh AUTHOR +.\" ------------------------------------------------------------------ +.An The RabbitMQ Team Aq Mt info@rabbitmq.com diff --git a/deps/rabbit/docs/rabbitmq-queues.8 b/deps/rabbit/docs/rabbitmq-queues.8 new file mode 100644 index 0000000000..a0bc41a19c --- /dev/null +++ b/deps/rabbit/docs/rabbitmq-queues.8 @@ -0,0 +1,202 @@ +.\" vim:ft=nroff: +.\" This Source Code Form is subject to the terms of the Mozilla Public +.\" 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/. +.\" +.\" Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. +.\" +.Dd September 28, 2019 +.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, +mainly member handling for quorum queues. +See the +.Lk https://www.rabbitmq.com/quorum-queues.html "RabbitMQ quorum queues guide" +and +.Lk https://www.rabbitmq.com/ha.html "RabbitMQ classic mirrored queues guide" +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 +.Lk https://www.rabbitmq.com/clustering.html "RabbitMQ Clustering guide" +.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 +.Lk https://www.rabbitmq.com/cli.html "RabbitMQ CLI Tools guide" +.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 +.\" ------------------------------------ +.It Cm grow Ar node Ar selector Fl -vhost-pattern Ar pattern Fl -queue-pattern Ar pattern Fl -errors-only +.Pp +Adds a new replica on the given node for all or a half of matching quorum queues. +.Pp +Supported +.Ar selector +values are: +.Bl -tag -width Ds +.It Dv Sy all +Selects all quorum queues +.It Dv Sy even +Selects quorum queues with an even number of replicas +.El +.Pp +Example: +.Sp +.Dl rabbitmq-queues grow Qo rabbit@newhost Qc Qo all Qc --vhost-pattern Qo a-vhost Qc --queue-pattern Qo .* Qc +.\" ------------------------------------ +.It Cm rebalance Ar type Fl -vhost-pattern Ar pattern Fl -queue-pattern Ar pattern +.Pp +Rebalances queue master replicas across cluster nodes. +.Pp +Supported +.Ar type +values are: +.Bl -tag -width Ds +.It Dv Sy all +All queue types +.It Dv Sy quorum +Only quorum queues +.It Dv Sy classic +Only classic queues +.El +.Pp +Example: +.Sp +.Dl rabbitmq-queues rebalance Qo all Qc --vhost-pattern Qo a-vhost Qc --queue-pattern Qo .* Qc +.\" ------------------------------------ +.It Cm shrink Ar node +.Pp +Shrinks quorum queue clusters by removing any members (replicas) on the given node. +.Pp +Example: +.Sp +.Dl rabbitmq-queues shrink Qo rabbit@decomissioned-node Qc +.\" ------------------------------------ +.El +.Ss Replication +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm add_member Ar queue Ar node Fl -vhost Ar virtual-host +.Pp +Adds a quorum queue member (replica) on the given node. +.Pp +Example: +.Sp +.Dl rabbitmq-queues add_member --vhost Qo a-vhost Qc Qo a-queue Qc Qo rabbit@new-node Qc +.\" ------------------------------------ +.It Cm delete_member Ar queue Ar node Fl -vhost Ar virtual-host +.Pp +Removes a quorum queue member (replica) on the given node. +.Pp +Example: +.Sp +.Dl rabbitmq-queues delete_member --vhost Qo a-vhost Qc Qo a-queue Qc Qo rabbit@decomissioned-node Qc +.\" ------------------------------------ +.El +.Ss Queues +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm quorum_status Ar queue Fl -vhost Ar virtual-host +.Pp +Displays quorum status of a quorum queue. +.Pp +Example: +.Sp +.Dl rabbitmq-queues quorum_status --vhost Qo a-vhost Qc Qo a-queue Qc +.It Cm check_if_node_is_mirror_sync_critical +.Pp +Health check that exits with a non-zero code if there are classic mirrored queues without online synchronised mirrors (queues that would potentially lose data if the target node is shut down). +.Pp +Example: +.Sp +.Dl rabbitmq-queues check_if_node_is_mirror_sync_critical +.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 +.\" ------------------------------------------------------------------ +.Sh SEE ALSO +.\" ------------------------------------------------------------------ +.Xr rabbitmqctl 8 , +.Xr rabbitmq-diagnostics 8 , +.Xr rabbitmq-server 8 , +.Xr rabbitmq-upgrade 8 , +.Xr rabbitmq-service 8 , +.Xr rabbitmq-env.conf 5 , +.Xr rabbitmq-echopid 8 +.\" ------------------------------------------------------------------ +.Sh AUTHOR +.\" ------------------------------------------------------------------ +.An The RabbitMQ Team Aq Mt info@rabbitmq.com diff --git a/deps/rabbit/docs/rabbitmq-server.8 b/deps/rabbit/docs/rabbitmq-server.8 new file mode 100644 index 0000000000..6a5e411cb3 --- /dev/null +++ b/deps/rabbit/docs/rabbitmq-server.8 @@ -0,0 +1,98 @@ +.\" vim:ft=nroff: +.\" This Source Code Form is subject to the terms of the Mozilla Public +.\" 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/. +.\" +.\" Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. +.\" +.Dd September 28, 2019 +.Dt RABBITMQ-SERVER 8 +.Os "RabbitMQ Server" +.Sh NAME +.Nm rabbitmq-server +.Nd starts a RabbitMQ node +.\" ------------------------------------------------------------------ +.Sh SYNOPSIS +.\" ------------------------------------------------------------------ +.Nm +.Op Fl detached +.\" ------------------------------------------------------------------ +.Sh DESCRIPTION +.\" ------------------------------------------------------------------ +RabbitMQ is an open source multi-protocol messaging broker. +.Pp +Running +.Nm +starts a RabbitMQ node in the foreground. The node will display a startup +banner and report when startup is complete. +To shut down the server, use service management tools or +.Xr rabbitmqctl 8 . +.\" ------------------------------------------------------------------ +.Sh ENVIRONMENT +.\" ------------------------------------------------------------------ +.Bl -tag -width Ds +.It Ev RABBITMQ_CONFIG_FILE +Defaults to +.Pa /etc/rabbitmq/rabbitmq.conf . +Node configuration file path. +To learn more, see the +.Lk https://www.rabbitmq.com/configure.html "RabbitMQ Configuration guide" +.It Ev RABBITMQ_MNESIA_BASE +Defaults to +.Pa /var/lib/rabbitmq/mnesia . +Node data directory will be located (or created) in this directory. +To learn more, see the +.Lk https://www.rabbitmq.com/relocate.html "RabbitMQ File and Directory guide" +.It Ev RABBITMQ_LOG_BASE +Defaults to +.Pa /var/log/rabbitmq . +Log files generated by the server will be placed in this directory. +To learn more, see the +.Lk https://www.rabbitmq.com/logging.html "RabbitMQ Logging guide" +.It Ev RABBITMQ_NODENAME +Defaults to +.Qq rabbit@ . +followed by the computed hostname. +Can be used to run multiple nodes on the same host. +Every node in a cluster must have a unique +.Ev RABBITMQ_NODENAME +To learn more, see the +.Lk https://www.rabbitmq.com/clustering.html "RabbitMQ Clustering guide" +.It Ev RABBITMQ_NODE_IP_ADDRESS +By default RabbitMQ will bind to all IPv6 and IPv4 interfaces available. +This variable limits the node to one network interface or address +family. +To learn more, see the +.Lk https://www.rabbitmq.com/networking.html "RabbitMQ Networking guide" +.It Ev RABBITMQ_NODE_PORT +AMQP 0-9-1 and AMQP 1.0 port. Defaults to 5672. +To learn more, see the +.Lk https://www.rabbitmq.com/networking.html "RabbitMQ Networking guide" +.El +.\" ------------------------------------------------------------------ +.Sh OPTIONS +.\" ------------------------------------------------------------------ +.Bl -tag -width Ds +.It Fl detached +Start the server process in the background. +Note that this will cause the pid not to be written to the pid file. +.Pp +For example, runs RabbitMQ AMQP server in the background: +.sp +.Dl rabbitmq-server -detached +.El +.\" ------------------------------------------------------------------ +.Sh SEE ALSO +.\" ------------------------------------------------------------------ +.Xr rabbitmqctl 8 , +.Xr rabbitmq-diagnostics 8 , +.Xr rabbitmq-plugins 8 , +.Xr rabbitmq-queues 8 , +.Xr rabbitmq-upgrade 8 , +.Xr rabbitmq-service 8 , +.Xr rabbitmq-env.conf 5 , +.Xr rabbitmq-echopid 8 +.\" ------------------------------------------------------------------ +.Sh AUTHOR +.\" ------------------------------------------------------------------ +.An The RabbitMQ Team Aq Mt info@rabbitmq.com diff --git a/deps/rabbit/docs/rabbitmq-server.service.example b/deps/rabbit/docs/rabbitmq-server.service.example new file mode 100644 index 0000000000..dec70eb635 --- /dev/null +++ b/deps/rabbit/docs/rabbitmq-server.service.example @@ -0,0 +1,27 @@ +# systemd unit example +[Unit] +Description=RabbitMQ broker +After=network.target epmd@0.0.0.0.socket +Wants=network.target epmd@0.0.0.0.socket + +[Service] +Type=notify +User=rabbitmq +Group=rabbitmq +NotifyAccess=all +TimeoutStartSec=3600 +# Note: +# You *may* wish to add the following to automatically restart RabbitMQ +# in the event of a failure. systemd service restarts are not a +# replacement for service monitoring. Please see +# https://www.rabbitmq.com/monitoring.html +# +# Restart=on-failure +# RestartSec=10 +WorkingDirectory=/var/lib/rabbitmq +ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server +ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop +ExecStop=/bin/sh -c "while ps -p $MAINPID >/dev/null 2>&1; do sleep 1; done" + +[Install] +WantedBy=multi-user.target diff --git a/deps/rabbit/docs/rabbitmq-service.8 b/deps/rabbit/docs/rabbitmq-service.8 new file mode 100644 index 0000000000..154388fcfc --- /dev/null +++ b/deps/rabbit/docs/rabbitmq-service.8 @@ -0,0 +1,152 @@ +.\" vim:ft=nroff: +.\" This Source Code Form is subject to the terms of the Mozilla Public +.\" 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/. +.\" +.\" Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. +.\" +.Dd September 28, 2019 +.Dt RABBITMQ-SERVICE.BAT 8 +.Os "RabbitMQ Server" +.Sh NAME +.Nm rabbitmq-service.bat +.Nd tool for managing RabbitMQ Windows service +.\" ------------------------------------------------------------------ +.Sh SYNOPSIS +.\" ------------------------------------------------------------------ +.Nm +.Op Ar command +.\" ------------------------------------------------------------------ +.Sh DESCRIPTION +.\" ------------------------------------------------------------------ +RabbitMQ is an open source multi-protocol messaging broker. +.Pp +Running +.Nm +allows the RabbitMQ broker to be run as a service in +Windows® environments. +The RabbitMQ broker service can be started and stopped using the +Windows® services panel. +.Pp +By default the service will run in the authentication context of the +local system account. +It is therefore necessary to synchronise Erlang cookies between the +local system account (typically +.Pa C:\(rsWindows\(rs.erlang.cookie +and the account that will be used to run +.Xr rabbitmqctl 8 . +.\" ------------------------------------------------------------------ +.Sh COMMANDS +.\" ------------------------------------------------------------------ +.Bl -tag -width Ds +.It Cm help +Display usage information. +.It Cm install +Install the service. +The service will not be started. +Subsequent invocations will update the service parameters if relevant +environment variables were modified. +.It Cm remove +Remove the service. +If the service is running then it will automatically be stopped before +being removed. +No files will be deleted as a consequence and +.Xr rabbitmq-server 8 +will remain operable. +.It Cm start +Start the service. +The service must have been correctly installed beforehand. +.It Cm stop +Stop the service. +The service must be running for this command to have any effect. +.It Cm disable +Disable the service. +This is the equivalent of setting the startup type to +.Sy Disabled +using the service control panel. +.It Cm enable +Enable the service. +This is the equivalent of setting the startup type to +.Sy Automatic +using the service control panel. +.El +.\" ------------------------------------------------------------------ +.Sh ENVIRONMENT +.\" ------------------------------------------------------------------ +.Bl -tag -width Ds +.It Ev RABBITMQ_SERVICENAME +Defaults to RabbitMQ. +.It Ev RABBITMQ_BASE +Note: Windows only. Defaults to the application data directory of the +current user. This is the location of log and database directories. +.It Ev RABBITMQ_NODENAME +Defaults to +.Qq rabbit@ . +followed by the computed hostname. +Can be used to run multiple nodes on the same host. +Every node in a cluster must have a unique +.Ev RABBITMQ_NODENAME +To learn more, see the +.Lk https://www.rabbitmq.com/clustering.html "RabbitMQ Clustering guide" +.It Ev RABBITMQ_NODE_IP_ADDRESS +By default RabbitMQ will bind to all IPv6 and IPv4 interfaces available. +This variable limits the node to one network interface or address +family. +To learn more, see the +.Lk https://www.rabbitmq.com/networking.html "RabbitMQ Networking guide" +.It Ev RABBITMQ_NODE_PORT +AMQP 0-9-1 and AMQP 1.0 port. Defaults to 5672. +To learn more, see the +.Lk https://www.rabbitmq.com/networking.html "RabbitMQ Networking guide" +.It Ev ERLANG_SERVICE_MANAGER_PATH +Defaults to +.Pa C:\(rsProgram\ Files\(rserl{version}\(rserts-{version}\(rsbin +(or +.Pa C:\(rsProgram\ Files\ (x86)\(rserl{version}\(rserts-{version}\(rsbin +for 64-bit environments). +This is the installation location of the Erlang service manager. +.It Ev RABBITMQ_CONSOLE_LOG +Set this variable to +.Sy new or +.Sy reuse +to have the console output from the server redirected to a file named +.Pa SERVICENAME.debug +in the application data directory of the user that installed the +service. +Under Vista this will be +.Pa C:\(rsUsers\(rsAppData\(rsusername\(rsSERVICENAME . +Under previous versions of Windows this will be +.Pa C:\(rsDocuments and Settings\(rsusername\(rsApplication Data\(rsSERVICENAME . +If +.Ev RABBITMQ_CONSOLE_LOG +is set to +.Sy new +then a new file will be created each time the service starts. +If +.Ev RABBITMQ_CONSOLE_LOG +is set to +.Sy reuse +then the file will be overwritten each time the service starts. +The default behaviour when +.Ev RABBITMQ_CONSOLE_LOG +is not set or set to a value other than +.Sy new +or +.Sy reuse +is to discard the server output. +.El +.\" ------------------------------------------------------------------ +.Sh SEE ALSO +.\" ------------------------------------------------------------------ +.Xr rabbitmqctl 8 , +.Xr rabbitmq-diagnostics 8 , +.Xr rabbitmq-plugins 8 , +.Xr rabbitmq-server 8 , +.Xr rabbitmq-queues 8 , +.Xr rabbitmq-upgrade 8 , +.Xr rabbitmq-env.conf 5 , +.Xr rabbitmq-echopid 8 +.\" ------------------------------------------------------------------ +.Sh AUTHOR +.\" ------------------------------------------------------------------ +.An The RabbitMQ Team Aq Mt info@rabbitmq.com diff --git a/deps/rabbit/docs/rabbitmq-upgrade.8 b/deps/rabbit/docs/rabbitmq-upgrade.8 new file mode 100644 index 0000000000..4fe7283f13 --- /dev/null +++ b/deps/rabbit/docs/rabbitmq-upgrade.8 @@ -0,0 +1,108 @@ +.\" vim:ft=nroff: +.\" This Source Code Form is subject to the terms of the Mozilla Public +.\" 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/. +.\" +.\" Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. +.\" +.Dd September 28, 2019 +.Dt RABBITMQ-UPGRADE 8 +.Os "RabbitMQ Server" +.Sh NAME +.Nm rabbitmq-upgrade +.Nd RabbitMQ installation upgrade 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 during the upgrade of RabbitMQ nodes. +See the +.Lk https://www.rabbitmq.com/upgrade.html "RabbitMQ upgrade guide" +to learn more about RabbitMQ installation upgrades. +. +.\" ------------------------------------------------------------------ +.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 +.Lk https://www.rabbitmq.com/clustering.html "RabbitMQ Clustering guide" +.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 +.Lk https://www.rabbitmq.com/cli.html "RabbitMQ CLI Tools guide" +.El +.\" ------------------------------------------------------------------ +.Sh COMMANDS +.\" ------------------------------------ +.Bl -tag -width Ds +.\" ------------------------------------ +.It Cm help +.Pp +Displays general help and commands supported by +.Nm . +.\" ------------------------------------ +.It Cm post_upgrade +.Pp +Runs post-upgrade tasks. In the current version, it performs the rebalance of mirrored and quorum queues across all nodes in the cluster. +.\" ------------------------------------------------------------------ +.Sh SEE ALSO +.\" ------------------------------------------------------------------ +.Xr rabbitmqctl 8 , +.Xr rabbitmq-diagnostics 8 , +.Xr rabbitmq-server 8 , +.Xr rabbitmq-queues 8 , +.Xr rabbitmq-service 8 , +.Xr rabbitmq-env.conf 5 , +.Xr rabbitmq-echopid 8 +.\" ------------------------------------------------------------------ +.Sh AUTHOR +.\" ------------------------------------------------------------------ +.An The RabbitMQ Team Aq Mt info@rabbitmq.com diff --git a/deps/rabbit/docs/rabbitmq.conf.example b/deps/rabbit/docs/rabbitmq.conf.example new file mode 100644 index 0000000000..17e023e62c --- /dev/null +++ b/deps/rabbit/docs/rabbitmq.conf.example @@ -0,0 +1,1002 @@ +# ====================================== +# RabbitMQ broker section +# ====================================== + +## Related doc guide: https://rabbitmq.com/configure.html. See +## https://rabbitmq.com/documentation.html for documentation ToC. + +## Networking +## ==================== +## +## Related doc guide: https://rabbitmq.com/networking.html. +## +## By default, RabbitMQ will listen on all interfaces, using +## the standard (reserved) AMQP 0-9-1 and 1.0 port. +## +# listeners.tcp.default = 5672 + + +## To listen on a specific interface, provide an IP address with port. +## For example, to listen only on localhost for both IPv4 and IPv6: +## +# IPv4 +# listeners.tcp.local = 127.0.0.1:5672 +# IPv6 +# listeners.tcp.local_v6 = ::1:5672 + +## You can define multiple listeners using listener names +# listeners.tcp.other_port = 5673 +# listeners.tcp.other_ip = 10.10.10.10:5672 + + +## TLS listeners are configured in the same fashion as TCP listeners, +## including the option to control the choice of interface. +## +# listeners.ssl.default = 5671 + +## It is possible to disable regular TCP (non-TLS) listeners. Clients +## not configured to use TLS and the correct TLS-enabled port won't be able +## to connect to this node. +# listeners.tcp = none + +## Number of Erlang processes that will accept connections for the TCP +## and TLS listeners. +## +# num_acceptors.tcp = 10 +# num_acceptors.ssl = 10 + +## Socket writer will force GC every so many bytes transferred. +## Default is 1 GiB (`1000000000`). Set to 'off' to disable. +## +# socket_writer.gc_threshold = 1000000000 +# +## To disable: +# socket_writer.gc_threshold = off + +## Maximum amount of time allowed for the AMQP 0-9-1 and AMQP 1.0 handshake +## (performed after socket connection and TLS handshake) to complete, in milliseconds. +## +# handshake_timeout = 10000 + +## Set to 'true' to perform reverse DNS lookups when accepting a +## connection. rabbitmqctl and management UI will then display hostnames +## instead of IP addresses. Default value is `false`. +## +# reverse_dns_lookups = false + +## +## Security, Access Control +## ============== +## + +## Related doc guide: https://rabbitmq.com/access-control.html. + +## The default "guest" user is only permitted to access the server +## via a loopback interface (e.g. localhost). +## {loopback_users, [<<"guest">>]}, +## +# loopback_users.guest = true + +## Uncomment the following line if you want to allow access to the +## guest user from anywhere on the network. +# loopback_users.guest = false + +## TLS configuration. +## +## Related doc guide: https://rabbitmq.com/ssl.html. +## +# ssl_options.verify = verify_peer +# ssl_options.fail_if_no_peer_cert = false +# ssl_options.cacertfile = /path/to/cacert.pem +# ssl_options.certfile = /path/to/cert.pem +# ssl_options.keyfile = /path/to/key.pem +# +# ssl_options.honor_cipher_order = true +# ssl_options.honor_ecc_order = true + +# ssl_options.ciphers.1 = ECDHE-ECDSA-AES256-GCM-SHA384 +# ssl_options.ciphers.2 = ECDHE-RSA-AES256-GCM-SHA384 +# ssl_options.ciphers.3 = ECDHE-ECDSA-AES256-SHA384 +# ssl_options.ciphers.4 = ECDHE-RSA-AES256-SHA384 +# ssl_options.ciphers.5 = ECDH-ECDSA-AES256-GCM-SHA384 +# ssl_options.ciphers.6 = ECDH-RSA-AES256-GCM-SHA384 +# ssl_options.ciphers.7 = ECDH-ECDSA-AES256-SHA384 +# ssl_options.ciphers.8 = ECDH-RSA-AES256-SHA384 +# ssl_options.ciphers.9 = DHE-RSA-AES256-GCM-SHA384 +# ssl_options.ciphers.10 = DHE-DSS-AES256-GCM-SHA384 +# ssl_options.ciphers.11 = DHE-RSA-AES256-SHA256 +# ssl_options.ciphers.12 = DHE-DSS-AES256-SHA256 +# ssl_options.ciphers.13 = ECDHE-ECDSA-AES128-GCM-SHA256 +# ssl_options.ciphers.14 = ECDHE-RSA-AES128-GCM-SHA256 +# ssl_options.ciphers.15 = ECDHE-ECDSA-AES128-SHA256 +# ssl_options.ciphers.16 = ECDHE-RSA-AES128-SHA256 +# ssl_options.ciphers.17 = ECDH-ECDSA-AES128-GCM-SHA256 +# ssl_options.ciphers.18 = ECDH-RSA-AES128-GCM-SHA256 +# ssl_options.ciphers.19 = ECDH-ECDSA-AES128-SHA256 +# ssl_options.ciphers.20 = ECDH-RSA-AES128-SHA256 +# ssl_options.ciphers.21 = DHE-RSA-AES128-GCM-SHA256 +# ssl_options.ciphers.22 = DHE-DSS-AES128-GCM-SHA256 +# ssl_options.ciphers.23 = DHE-RSA-AES128-SHA256 +# ssl_options.ciphers.24 = DHE-DSS-AES128-SHA256 +# ssl_options.ciphers.25 = ECDHE-ECDSA-AES256-SHA +# ssl_options.ciphers.26 = ECDHE-RSA-AES256-SHA +# ssl_options.ciphers.27 = DHE-RSA-AES256-SHA +# ssl_options.ciphers.28 = DHE-DSS-AES256-SHA +# ssl_options.ciphers.29 = ECDH-ECDSA-AES256-SHA +# ssl_options.ciphers.30 = ECDH-RSA-AES256-SHA +# ssl_options.ciphers.31 = ECDHE-ECDSA-AES128-SHA +# ssl_options.ciphers.32 = ECDHE-RSA-AES128-SHA +# ssl_options.ciphers.33 = DHE-RSA-AES128-SHA +# ssl_options.ciphers.34 = DHE-DSS-AES128-SHA +# ssl_options.ciphers.35 = ECDH-ECDSA-AES128-SHA +# ssl_options.ciphers.36 = ECDH-RSA-AES128-SHA + +## Select an authentication/authorisation backend to use. +## +## Alternative backends are provided by plugins, such as rabbitmq-auth-backend-ldap. +## +## NB: These settings require certain plugins to be enabled. +## +## Related doc guides: +## +## * https://rabbitmq.com/plugins.html +## * https://rabbitmq.com/access-control.html +## + +# auth_backends.1 = rabbit_auth_backend_internal + +## uses separate backends for authentication and authorisation, +## see below. +# auth_backends.1.authn = rabbit_auth_backend_ldap +# auth_backends.1.authz = rabbit_auth_backend_internal + +## The rabbitmq_auth_backend_ldap plugin allows the broker to +## perform authentication and authorisation by deferring to an +## external LDAP server. +## +## Relevant doc guides: +## +## * https://rabbitmq.com/ldap.html +## * https://rabbitmq.com/access-control.html +## +## uses LDAP for both authentication and authorisation +# auth_backends.1 = rabbit_auth_backend_ldap + +## uses HTTP service for both authentication and +## authorisation +# auth_backends.1 = rabbit_auth_backend_http + +## uses two backends in a chain: HTTP first, then internal +# auth_backends.1 = rabbit_auth_backend_http +# auth_backends.2 = rabbit_auth_backend_internal + +## Authentication +## The built-in mechanisms are 'PLAIN', +## 'AMQPLAIN', and 'EXTERNAL' Additional mechanisms can be added via +## plugins. +## +## Related doc guide: https://rabbitmq.com/authentication.html. +## +# auth_mechanisms.1 = PLAIN +# auth_mechanisms.2 = AMQPLAIN + +## The rabbitmq-auth-mechanism-ssl plugin makes it possible to +## authenticate a user based on the client's x509 (TLS) certificate. +## Related doc guide: https://rabbitmq.com/authentication.html. +## +## To use auth-mechanism-ssl, the EXTERNAL mechanism should +## be enabled: +## +# auth_mechanisms.1 = PLAIN +# auth_mechanisms.2 = AMQPLAIN +# auth_mechanisms.3 = EXTERNAL + +## To force x509 certificate-based authentication on all clients, +## exclude all other mechanisms (note: this will disable password-based +## authentication even for the management UI!): +## +# auth_mechanisms.1 = EXTERNAL + +## This pertains to both the rabbitmq-auth-mechanism-ssl plugin and +## STOMP ssl_cert_login configurations. See the RabbitMQ STOMP plugin +## configuration section later in this file and the README in +## https://github.com/rabbitmq/rabbitmq-auth-mechanism-ssl for further +## details. +## +## To use the TLS cert's CN instead of its DN as the username +## +# ssl_cert_login_from = common_name + +## TLS handshake timeout, in milliseconds. +## +# ssl_handshake_timeout = 5000 + + +## Cluster name +## +# cluster_name = dev3.eng.megacorp.local + +## Password hashing implementation. Will only affect newly +## created users. To recalculate hash for an existing user +## it's necessary to update her password. +## +## To use SHA-512, set to rabbit_password_hashing_sha512. +## +# password_hashing_module = rabbit_password_hashing_sha256 + +## When importing definitions exported from versions earlier +## than 3.6.0, it is possible to go back to MD5 (only do this +## as a temporary measure!) by setting this to rabbit_password_hashing_md5. +## +# password_hashing_module = rabbit_password_hashing_md5 + +## +## Default User / VHost +## ==================== +## + +## On first start RabbitMQ will create a vhost and a user. These +## config items control what gets created. +## Relevant doc guide: https://rabbitmq.com/access-control.html +## +# default_vhost = / +# default_user = guest +# default_pass = guest + +# default_permissions.configure = .* +# default_permissions.read = .* +# default_permissions.write = .* + +## Tags for default user +## +## For more details about tags, see the documentation for the +## Management Plugin at https://rabbitmq.com/management.html. +## +# default_user_tags.administrator = true + +## Define other tags like this: +# default_user_tags.management = true +# default_user_tags.custom_tag = true + +## +## Additional network and protocol related configuration +## ===================================================== +## + +## Set the default AMQP 0-9-1 heartbeat interval (in seconds). +## Related doc guides: +## +## * https://rabbitmq.com/heartbeats.html +## * https://rabbitmq.com/networking.html +## +# heartbeat = 60 + +## Set the max permissible size of an AMQP frame (in bytes). +## +# frame_max = 131072 + +## Set the max frame size the server will accept before connection +## tuning occurs +## +# initial_frame_max = 4096 + +## Set the max permissible number of channels per connection. +## 0 means "no limit". +## +# channel_max = 128 + +## Customising TCP Listener (Socket) Configuration. +## +## Related doc guides: +## +## * https://rabbitmq.com/networking.html +## * https://www.erlang.org/doc/man/inet.html#setopts-2 +## + +# tcp_listen_options.backlog = 128 +# tcp_listen_options.nodelay = true +# tcp_listen_options.exit_on_close = false +# +# tcp_listen_options.keepalive = true +# tcp_listen_options.send_timeout = 15000 +# +# tcp_listen_options.buffer = 196608 +# tcp_listen_options.sndbuf = 196608 +# tcp_listen_options.recbuf = 196608 + +## +## Resource Limits & Flow Control +## ============================== +## +## Related doc guide: https://rabbitmq.com/memory.html. + +## Memory-based Flow Control threshold. +## +# vm_memory_high_watermark.relative = 0.4 + +## Alternatively, we can set a limit (in bytes) of RAM used by the node. +## +# vm_memory_high_watermark.absolute = 1073741824 + +## Or you can set absolute value using memory units (with RabbitMQ 3.6.0+). +## Absolute watermark will be ignored if relative is defined! +## +# vm_memory_high_watermark.absolute = 2GB +## +## Supported unit symbols: +## +## k, kiB: kibibytes (2^10 - 1,024 bytes) +## M, MiB: mebibytes (2^20 - 1,048,576 bytes) +## G, GiB: gibibytes (2^30 - 1,073,741,824 bytes) +## kB: kilobytes (10^3 - 1,000 bytes) +## MB: megabytes (10^6 - 1,000,000 bytes) +## GB: gigabytes (10^9 - 1,000,000,000 bytes) + + + +## Fraction of the high watermark limit at which queues start to +## page message out to disc in order to free up memory. +## For example, when vm_memory_high_watermark is set to 0.4 and this value is set to 0.5, +## paging can begin as early as when 20% of total available RAM is used by the node. +## +## Values greater than 1.0 can be dangerous and should be used carefully. +## +## One alternative to this is to use durable queues and publish messages +## as persistent (delivery mode = 2). With this combination queues will +## move messages to disk much more rapidly. +## +## Another alternative is to configure queues to page all messages (both +## persistent and transient) to disk as quickly +## as possible, see https://rabbitmq.com/lazy-queues.html. +## +# vm_memory_high_watermark_paging_ratio = 0.5 + +## Selects Erlang VM memory consumption calculation strategy. Can be `allocated`, `rss` or `legacy` (aliased as `erlang`), +## Introduced in 3.6.11. `rss` is the default as of 3.6.12. +## See https://github.com/rabbitmq/rabbitmq-server/issues/1223 and rabbitmq/rabbitmq-common#224 for background. +# vm_memory_calculation_strategy = rss + +## Interval (in milliseconds) at which we perform the check of the memory +## levels against the watermarks. +## +# memory_monitor_interval = 2500 + +## The total memory available can be calculated from the OS resources +## - default option - or provided as a configuration parameter. +# total_memory_available_override_value = 2GB + +## Set disk free limit (in bytes). Once free disk space reaches this +## lower bound, a disk alarm will be set - see the documentation +## listed above for more details. +## +## Absolute watermark will be ignored if relative is defined! +# disk_free_limit.absolute = 50000 + +## Or you can set it using memory units (same as in vm_memory_high_watermark) +## with RabbitMQ 3.6.0+. +# disk_free_limit.absolute = 500KB +# disk_free_limit.absolute = 50mb +# disk_free_limit.absolute = 5GB + +## Alternatively, we can set a limit relative to total available RAM. +## +## Values lower than 1.0 can be dangerous and should be used carefully. +# disk_free_limit.relative = 2.0 + +## +## Clustering +## ===================== +## +# cluster_partition_handling = ignore + +## pause_if_all_down strategy require additional configuration +# cluster_partition_handling = pause_if_all_down + +## Recover strategy. Can be either 'autoheal' or 'ignore' +# cluster_partition_handling.pause_if_all_down.recover = ignore + +## Node names to check +# cluster_partition_handling.pause_if_all_down.nodes.1 = rabbit@localhost +# cluster_partition_handling.pause_if_all_down.nodes.2 = hare@localhost + +## Mirror sync batch size, in messages. Increasing this will speed +## up syncing but total batch size in bytes must not exceed 2 GiB. +## Available in RabbitMQ 3.6.0 or later. +## +# mirroring_sync_batch_size = 4096 + +## Make clustering happen *automatically* at startup. Only applied +## to nodes that have just been reset or started for the first time. +## +## Relevant doc guide: https://rabbitmq.com//cluster-formation.html +## + +# cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config +# +# cluster_formation.classic_config.nodes.1 = rabbit1@hostname +# cluster_formation.classic_config.nodes.2 = rabbit2@hostname +# cluster_formation.classic_config.nodes.3 = rabbit3@hostname +# cluster_formation.classic_config.nodes.4 = rabbit4@hostname + +## DNS-based peer discovery. This backend will list A records +## of the configured hostname and perform reverse lookups for +## the addresses returned. + +# cluster_formation.peer_discovery_backend = rabbit_peer_discovery_dns +# cluster_formation.dns.hostname = discovery.eng.example.local + +## This node's type can be configured. If you are not sure +## what node type to use, always use 'disc'. +# cluster_formation.node_type = disc + +## Interval (in milliseconds) at which we send keepalive messages +## to other cluster members. Note that this is not the same thing +## as net_ticktime; missed keepalive messages will not cause nodes +## to be considered down. +## +# cluster_keepalive_interval = 10000 + +## +## Statistics Collection +## ===================== +## + +## Statistics collection interval (in milliseconds). Increasing +## this will reduce the load on management database. +## +# collect_statistics_interval = 5000 + +## Fine vs. coarse statistics +# +# This value is no longer meant to be configured directly. +# +# See https://www.rabbitmq.com/management.html#fine-stats. + +## +## Ra Settings +## ===================== +## +# raft.segment_max_entries = 65536 +# raft.wal_max_size_bytes = 1048576 +# raft.wal_max_batch_size = 4096 +# raft.snapshot_chunk_size = 1000000 + +## +## Misc/Advanced Options +## ===================== +## +## NB: Change these only if you understand what you are doing! +## + +## Timeout used when waiting for Mnesia tables in a cluster to +## become available. +## +# mnesia_table_loading_retry_timeout = 30000 + +## Retries when waiting for Mnesia tables in the cluster startup. Note that +## this setting is not applied to Mnesia upgrades or node deletions. +## +# mnesia_table_loading_retry_limit = 10 + +## Size in bytes below which to embed messages in the queue index. +## Related doc guide: https://rabbitmq.com/persistence-conf.html +## +# queue_index_embed_msgs_below = 4096 + +## You can also set this size in memory units +## +# queue_index_embed_msgs_below = 4kb + +## Whether or not to enable background periodic forced GC runs for all +## Erlang processes on the node in "waiting" state. +## +## Disabling background GC may reduce latency for client operations, +## keeping it enabled may reduce median RAM usage by the binary heap +## (see https://www.erlang-solutions.com/blog/erlang-garbage-collector.html). +## +## Before trying this option, please take a look at the memory +## breakdown (https://www.rabbitmq.com/memory-use.html). +## +# background_gc_enabled = false + +## Target (desired) interval (in milliseconds) at which we run background GC. +## The actual interval will vary depending on how long it takes to execute +## the operation (can be higher than this interval). Values less than +## 30000 milliseconds are not recommended. +## +# background_gc_target_interval = 60000 + +## Whether or not to enable proxy protocol support. +## Once enabled, clients cannot directly connect to the broker +## anymore. They must connect through a load balancer that sends the +## proxy protocol header to the broker at connection time. +## This setting applies only to AMQP clients, other protocols +## like MQTT or STOMP have their own setting to enable proxy protocol. +## See the plugins documentation for more information. +## +# proxy_protocol = false + +## Overriden product name and version. +## They are set to "RabbitMQ" and the release version by default. +# product.name = RabbitMQ +# product.version = 1.2.3 + +## "Message of the day" file. +## Its content is used to expand the logged and printed banners. +## Default to /etc/rabbitmq/motd on Unix, %APPDATA%\RabbitMQ\motd.txt +## on Windows. +# motd_file = /etc/rabbitmq/motd + +## ---------------------------------------------------------------------------- +## Advanced Erlang Networking/Clustering Options. +## +## Related doc guide: https://rabbitmq.com/clustering.html +## ---------------------------------------------------------------------------- + +# ====================================== +# Kernel section +# ====================================== + +## Timeout used to detect peer unavailability, including CLI tools. +## Related doc guide: https://www.rabbitmq.com/nettick.html. +## +# net_ticktime = 60 + +## Inter-node communication port range. +## The parameters inet_dist_listen_min and inet_dist_listen_max +## can be configured in the classic config format only. +## Related doc guide: https://www.rabbitmq.com/networking.html#epmd-inet-dist-port-range. + + +## ---------------------------------------------------------------------------- +## RabbitMQ Management Plugin +## +## Related doc guide: https://rabbitmq.com/management.html. +## ---------------------------------------------------------------------------- + +# ======================================= +# Management section +# ======================================= + +## Preload schema definitions from the following JSON file. +## Related doc guide: https://rabbitmq.com/management.html#load-definitions. +## +# management.load_definitions = /path/to/exported/definitions.json + +## Log all requests to the management HTTP API to a file. +## +# management.http_log_dir = /path/to/access.log + +## HTTP listener and embedded Web server settings. +# ## See https://rabbitmq.com/management.html for details. +# +# management.tcp.port = 15672 +# management.tcp.ip = 0.0.0.0 +# +# management.tcp.shutdown_timeout = 7000 +# management.tcp.max_keepalive = 120 +# management.tcp.idle_timeout = 120 +# management.tcp.inactivity_timeout = 120 +# management.tcp.request_timeout = 120 +# management.tcp.compress = true + +## HTTPS listener settings. +## See https://rabbitmq.com/management.html and https://rabbitmq.com/ssl.html for details. +## +# management.ssl.port = 15671 +# management.ssl.cacertfile = /path/to/ca_certificate.pem +# management.ssl.certfile = /path/to/server_certificate.pem +# management.ssl.keyfile = /path/to/server_key.pem + +## More TLS options +# management.ssl.honor_cipher_order = true +# management.ssl.honor_ecc_order = true +# management.ssl.client_renegotiation = false +# management.ssl.secure_renegotiate = true + +## Supported TLS versions +# management.ssl.versions.1 = tlsv1.2 +# management.ssl.versions.2 = tlsv1.1 + +## Cipher suites the server is allowed to use +# management.ssl.ciphers.1 = ECDHE-ECDSA-AES256-GCM-SHA384 +# management.ssl.ciphers.2 = ECDHE-RSA-AES256-GCM-SHA384 +# management.ssl.ciphers.3 = ECDHE-ECDSA-AES256-SHA384 +# management.ssl.ciphers.4 = ECDHE-RSA-AES256-SHA384 +# management.ssl.ciphers.5 = ECDH-ECDSA-AES256-GCM-SHA384 +# management.ssl.ciphers.6 = ECDH-RSA-AES256-GCM-SHA384 +# management.ssl.ciphers.7 = ECDH-ECDSA-AES256-SHA384 +# management.ssl.ciphers.8 = ECDH-RSA-AES256-SHA384 +# management.ssl.ciphers.9 = DHE-RSA-AES256-GCM-SHA384 + +## URL path prefix for HTTP API and management UI +# management.path_prefix = /a-prefix + +## One of 'basic', 'detailed' or 'none'. See +## https://rabbitmq.com/management.html#fine-stats for more details. +# management.rates_mode = basic + +## Configure how long aggregated data (such as message rates and queue +## lengths) is retained. Please read the plugin's documentation in +## https://rabbitmq.com/management.html#configuration for more +## details. +## Your can use 'minute', 'hour' and 'day' keys or integer key (in seconds) +# management.sample_retention_policies.global.minute = 5 +# management.sample_retention_policies.global.hour = 60 +# management.sample_retention_policies.global.day = 1200 + +# management.sample_retention_policies.basic.minute = 5 +# management.sample_retention_policies.basic.hour = 60 + +# management.sample_retention_policies.detailed.10 = 5 + +## ---------------------------------------------------------------------------- +## RabbitMQ Shovel Plugin +## +## Related doc guide: https://rabbitmq.com/shovel.html +## ---------------------------------------------------------------------------- + +## See advanced.config.example for a Shovel plugin example + + +## ---------------------------------------------------------------------------- +## RabbitMQ STOMP Plugin +## +## Related doc guide: https://rabbitmq.com/stomp.html +## ---------------------------------------------------------------------------- + +# ======================================= +# STOMP section +# ======================================= + +## See https://rabbitmq.com/stomp.html for details. + +## TCP listeners. +## +# stomp.listeners.tcp.1 = 127.0.0.1:61613 +# stomp.listeners.tcp.2 = ::1:61613 + +## TCP listener settings +## +# stomp.tcp_listen_options.backlog = 2048 +# stomp.tcp_listen_options.recbuf = 131072 +# stomp.tcp_listen_options.sndbuf = 131072 +# +# stomp.tcp_listen_options.keepalive = true +# stomp.tcp_listen_options.nodelay = true +# +# stomp.tcp_listen_options.exit_on_close = true +# stomp.tcp_listen_options.send_timeout = 120 + +## Proxy protocol support +## +# stomp.proxy_protocol = false + +## TLS listeners +## See https://rabbitmq.com/stomp.html and https://rabbitmq.com/ssl.html for details. +# stomp.listeners.ssl.default = 61614 +# +# ssl_options.cacertfile = path/to/cacert.pem +# ssl_options.certfile = path/to/cert.pem +# ssl_options.keyfile = path/to/key.pem +# ssl_options.verify = verify_peer +# ssl_options.fail_if_no_peer_cert = true + + +## Number of Erlang processes that will accept connections for the TCP +## and TLS listeners. +## +# stomp.num_acceptors.tcp = 10 +# stomp.num_acceptors.ssl = 1 + +## Additional TLS options + +## Extract a name from the client's certificate when using TLS. +## +# stomp.ssl_cert_login = true + +## Set a default user name and password. This is used as the default login +## whenever a CONNECT frame omits the login and passcode headers. +## +## Please note that setting this will allow clients to connect without +## authenticating! +## +# stomp.default_user = guest +# stomp.default_pass = guest + +## If a default user is configured, or you have configured use TLS client +## certificate based authentication, you can choose to allow clients to +## omit the CONNECT frame entirely. If set to true, the client is +## automatically connected as the default user or user supplied in the +## TLS certificate whenever the first frame sent on a session is not a +## CONNECT frame. +## +# stomp.implicit_connect = true + +## Whether or not to enable proxy protocol support. +## Once enabled, clients cannot directly connect to the broker +## anymore. They must connect through a load balancer that sends the +## proxy protocol header to the broker at connection time. +## This setting applies only to STOMP clients, other protocols +## like MQTT or AMQP have their own setting to enable proxy protocol. +## See the plugins or broker documentation for more information. +## +# stomp.proxy_protocol = false + +## ---------------------------------------------------------------------------- +## RabbitMQ MQTT Adapter +## +## See https://github.com/rabbitmq/rabbitmq-mqtt/blob/stable/README.md +## for details +## ---------------------------------------------------------------------------- + +# ======================================= +# MQTT section +# ======================================= + +## TCP listener settings. +## +# mqtt.listeners.tcp.1 = 127.0.0.1:61613 +# mqtt.listeners.tcp.2 = ::1:61613 + +## TCP listener options (as per the broker configuration). +## +# mqtt.tcp_listen_options.backlog = 4096 +# mqtt.tcp_listen_options.recbuf = 131072 +# mqtt.tcp_listen_options.sndbuf = 131072 +# +# mqtt.tcp_listen_options.keepalive = true +# mqtt.tcp_listen_options.nodelay = true +# +# mqtt.tcp_listen_options.exit_on_close = true +# mqtt.tcp_listen_options.send_timeout = 120 + +## TLS listener settings +## ## See https://rabbitmq.com/mqtt.html and https://rabbitmq.com/ssl.html for details. +# +# mqtt.listeners.ssl.default = 8883 +# +# ssl_options.cacertfile = /path/to/tls/ca_certificate_bundle.pem +# ssl_options.certfile = /path/to/tls/server_certificate.pem +# ssl_options.keyfile = /path/to/tls/server_key.pem +# ssl_options.verify = verify_peer +# ssl_options.fail_if_no_peer_cert = true +# + + +## Number of Erlang processes that will accept connections for the TCP +## and TLS listeners. +## +# mqtt.num_acceptors.tcp = 10 +# mqtt.num_acceptors.ssl = 10 + +## Whether or not to enable proxy protocol support. +## Once enabled, clients cannot directly connect to the broker +## anymore. They must connect through a load balancer that sends the +## proxy protocol header to the broker at connection time. +## This setting applies only to STOMP clients, other protocols +## like STOMP or AMQP have their own setting to enable proxy protocol. +## See the plugins or broker documentation for more information. +## +# mqtt.proxy_protocol = false + +## Set the default user name and password used for anonymous connections (when client +## provides no credentials). Anonymous connections are highly discouraged! +## +# mqtt.default_user = guest +# mqtt.default_pass = guest + +## Enable anonymous connections. If this is set to false, clients MUST provide +## credentials in order to connect. See also the mqtt.default_user/mqtt.default_pass +## keys. Anonymous connections are highly discouraged! +## +# mqtt.allow_anonymous = true + +## If you have multiple vhosts, specify the one to which the +## adapter connects. +## +# mqtt.vhost = / + +## Specify the exchange to which messages from MQTT clients are published. +## +# mqtt.exchange = amq.topic + +## Specify TTL (time to live) to control the lifetime of non-clean sessions. +## +# mqtt.subscription_ttl = 1800000 + +## Set the prefetch count (governing the maximum number of unacknowledged +## messages that will be delivered). +## +# mqtt.prefetch = 10 + + +## ---------------------------------------------------------------------------- +## RabbitMQ AMQP 1.0 Support +## +## See https://github.com/rabbitmq/rabbitmq-amqp1.0/blob/stable/README.md. +## ---------------------------------------------------------------------------- + +# ======================================= +# AMQP 1.0 section +# ======================================= + + +## Connections that are not authenticated with SASL will connect as this +## account. See the README for more information. +## +## Please note that setting this will allow clients to connect without +## authenticating! +## +# amqp1_0.default_user = guest + +## Enable protocol strict mode. See the README for more information. +## +# amqp1_0.protocol_strict_mode = false + +## Logging settings. +## +## See https://rabbitmq.com/logging.html and https://github.com/erlang-lager/lager for details. +## + +## Log directory, taken from the RABBITMQ_LOG_BASE env variable by default. +## +# log.dir = /var/log/rabbitmq + +## Logging to file. Can be false or a filename. +## Default: +# log.file = rabbit.log + +## To disable logging to a file +# log.file = false + +## Log level for file logging +## +# log.file.level = info + +## File rotation config. No rotation by default. +## DO NOT SET rotation date to ''. Leave the value unset if "" is the desired value +# log.file.rotation.date = $D0 +# log.file.rotation.size = 0 + +## Logging to console (can be true or false) +## +# log.console = false + +## Log level for console logging +## +# log.console.level = info + +## Logging to the amq.rabbitmq.log exchange (can be true or false) +## +# log.exchange = false + +## Log level to use when logging to the amq.rabbitmq.log exchange +## +# log.exchange.level = info + + + +## ---------------------------------------------------------------------------- +## RabbitMQ LDAP Plugin +## +## Related doc guide: https://rabbitmq.com/ldap.html. +## +## ---------------------------------------------------------------------------- + +# ======================================= +# LDAP section +# ======================================= + +## +## Connecting to the LDAP server(s) +## ================================ +## + +## Specify servers to bind to. You *must* set this in order for the plugin +## to work properly. +## +# auth_ldap.servers.1 = your-server-name-goes-here + +## You can define multiple servers +# auth_ldap.servers.2 = your-other-server + +## Connect to the LDAP server using TLS +## +# auth_ldap.use_ssl = false + +## Specify the LDAP port to connect to +## +# auth_ldap.port = 389 + +## LDAP connection timeout, in milliseconds or 'infinity' +## +# auth_ldap.timeout = infinity + +## Or number +# auth_ldap.timeout = 500 + +## Enable logging of LDAP queries. +## One of +## - false (no logging is performed) +## - true (verbose logging of the logic used by the plugin) +## - network (as true, but additionally logs LDAP network traffic) +## +## Defaults to false. +## +# auth_ldap.log = false + +## Also can be true or network +# auth_ldap.log = true +# auth_ldap.log = network + +## +## Authentication +## ============== +## + +## Pattern to convert the username given through AMQP to a DN before +## binding +## +# auth_ldap.user_dn_pattern = cn=${username},ou=People,dc=example,dc=com + +## Alternatively, you can convert a username to a Distinguished +## Name via an LDAP lookup after binding. See the documentation for +## full details. + +## When converting a username to a dn via a lookup, set these to +## the name of the attribute that represents the user name, and the +## base DN for the lookup query. +## +# auth_ldap.dn_lookup_attribute = userPrincipalName +# auth_ldap.dn_lookup_base = DC=gopivotal,DC=com + +## Controls how to bind for authorisation queries and also to +## retrieve the details of users logging in without presenting a +## password (e.g., SASL EXTERNAL). +## One of +## - as_user (to bind as the authenticated user - requires a password) +## - anon (to bind anonymously) +## - {UserDN, Password} (to bind with a specified user name and password) +## +## Defaults to 'as_user'. +## +# auth_ldap.other_bind = as_user + +## Or can be more complex: +# auth_ldap.other_bind.user_dn = User +# auth_ldap.other_bind.password = Password + +## If user_dn and password defined - other options is ignored. + +# ----------------------------- +# Too complex section of LDAP +# ----------------------------- + +## +## Authorisation +## ============= +## + +## The LDAP plugin can perform a variety of queries against your +## LDAP server to determine questions of authorisation. +## +## Related doc guide: https://rabbitmq.com/ldap.html#authorisation. + +## Following configuration should be defined in advanced.config file +## DO NOT UNCOMMENT THESE LINES! + +## Set the query to use when determining vhost access +## +## {vhost_access_query, {in_group, +## "ou=${vhost}-users,ou=vhosts,dc=example,dc=com"}}, + +## Set the query to use when determining resource (e.g., queue) access +## +## {resource_access_query, {constant, true}}, + +## Set queries to determine which tags a user has +## +## {tag_queries, []} +# ]}, +# ----------------------------- diff --git a/deps/rabbit/docs/rabbitmqctl.8 b/deps/rabbit/docs/rabbitmqctl.8 new file mode 100644 index 0000000000..3e041ad2c8 --- /dev/null +++ b/deps/rabbit/docs/rabbitmqctl.8 @@ -0,0 +1,2424 @@ +.\" vim:ft=nroff: +.\" This Source Code Form is subject to the terms of the Mozilla Public +.\" 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/. +.\" +.\" Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved. +.\" +.Dd September 28, 2019 +.Dt RABBITMQCTL 8 +.Os "RabbitMQ Server" +.Sh NAME +.Nm rabbitmqctl +.Nd tool for managing RabbitMQ nodes +.\" ------------------------------------------------------------------------------------------------ +.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 +.\" ------------------------------------------------------------------------------------------------ +RabbitMQ is an open source multi-protocol messaging broker. +.Pp +.Nm +is a command line tool for managing a RabbitMQ server node. +It performs all actions by connecting to the target RabbitMQ node +on a dedicated CLI tool communication port and authenticating +using a shared secret (known as the cookie file). +.Pp +Diagnostic information is displayed if connection failed, +the target node was not running, or +.Nm +could not authenticate to +the target node successfully. +To learn more, see the +.Lk https://www.rabbitmq.com/cli.html "RabbitMQ CLI Tools guide" +and +.Lk https://www.rabbitmq.com/networking.html "RabbitMQ Networking guide" +.\" ------------------------------------------------------------------------------------------------ +.Sh OPTIONS +.\" ------------------------------------------------------------------------------------------------ +.Bl -tag -width Ds +.It Fl n Ar node +Default node is +.Qq Ar rabbit@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 -no-table-headers +Do not output headers for tabular data. +.It Fl -dry-run +Do not run the command. +Only print information message. +.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 +.Lk https://www.rabbitmq.com/clustering.html "RabbitMQ Clustering guide" +.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 +.Lk https://www.rabbitmq.com/cli.html "RabbitMQ CLI Tools guide" +.El +.\" ------------------------------------------------------------------------------------------------ +.Sh COMMANDS +.\" ------------------------------------------------------------------------------------------------ +.Bl -tag -width Ds +.It Cm help Oo Fl l Oc Op Ar command_name +.Pp +Prints usage for all available commands. +.Bl -tag -width Ds +.It Fl l , Fl -list-commands +List command usages only, without parameter explanation. +.It Ar command_name +Prints usage for the specified command. +.El +.\" ------------------------------------------------------------------ +.It Cm version +.Pp +Displays CLI tools version +.El +.\" ------------------------------------------------------------------ +.\" ## Nodes +.\" ------------------------------------------------------------------ +.Ss Nodes +.Bl -tag -width Ds +.\" ------------------------------------------------------------------ +.It Cm await_startup +.Pp +Waits for the RabbitMQ application to start on the target node +.Pp +For example, to wait for the RabbitMQ application to start: +.sp +.Dl rabbitmqctl await_startup +.\" ------------------------------------------------------------------ +.It Cm reset +.Pp +Returns a RabbitMQ node to its virgin state. +.Pp +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. +.Pp +For +.Cm reset +and +.Cm force_reset +to succeed the RabbitMQ application must have been stopped, e.g. with +.Cm stop_app . +.Pp +For example, to reset the RabbitMQ node: +.sp +.Dl rabbitmqctl reset +.\" ------------------------------------------------------------------ +.It Cm rotate_logs +.Pp +Instructs the RabbitMQ node to perform internal log rotation. +.Pp +Log rotation is performed according to lager settings specified in +configuration file. +.Pp +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. +.Pp +For example, this command starts internal log rotation +process: +.sp +.Dl rabbitmqctl rotate_logs +.Pp +Rotation is performed asynchronously, so there is no guarantee that it +will be completed when this command returns. +.\" ------------------------------------------------------------------ +.It Cm shutdown +.Pp +Shuts down the node, both RabbitMQ and its runtime. +The command is blocking and will return after the runtime process exits. +If RabbitMQ fails to stop, it will return a non-zero exit code. +This command infers the OS PID of the target node and +therefore can only be used to shut down nodes running on the same +host (or broadly speaking, in the same operating system, +e.g. in the same VM or container) +.Pp +Unlike the stop command, the shutdown command: +.Bl -bullet +.It +does not require a +.Ar pid_file +to wait for the runtime process to exit +.It +returns a non-zero exit code if RabbitMQ node is not running +.El +.Pp +For example, this will shut down a locally running RabbitMQ node +with default node name: +.sp +.Dl rabbitmqctl shutdown +.\" ------------------------------------------------------------------ +.It Cm start_app +.Pp +Starts the RabbitMQ application. +.Pp +This command is typically run after performing other management actions +that required the RabbitMQ application to be stopped, e.g.\& +.Cm reset . +.Pp +For example, to instruct the RabbitMQ node to start the RabbitMQ +application: +.sp +.Dl rabbitmqctl start_app +.\" ------------------------------------------------------------------ +.It Cm stop Op Ar pid_file +.Pp +Stops the Erlang node on which RabbitMQ is running. +To restart the node follow the instructions for +.Qq Running the Server +in the +.Lk https://rabbitmq.com/download.html installation guide . +.Pp +If a +.Ar pid_file +is specified, also waits for the process specified there to terminate. +See the description of the +.Cm wait +command for details on this file. +.Pp +For example, to instruct the RabbitMQ node to terminate: +.sp +.Dl rabbitmqctl stop +.\" ------------------------------------------------------------------ +.It Cm stop_app +.Pp +Stops the RabbitMQ application, leaving the runtime (Erlang VM) running. +.Pp +This command is typically run prior to performing other management +actions that require the RabbitMQ application to be stopped, e.g.\& +.Cm reset . +.Pp +For example, to instruct the RabbitMQ node to stop the RabbitMQ +application: +.sp +.Dl rabbitmqctl stop_app +.\" ------------------------------------------------------------------ +.It Cm wait Ar pid_file , Cm wait Fl -pid Ar pid +.Pp +Waits for the RabbitMQ application to start. +.Pp +This command will wait for the RabbitMQ application to start at the +node. +It will wait for the pid file to be created if +.Ar pidfile +is specified, then for a process with a pid specified in the pid file or +the +.Fl -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. +.Pp +If the specified pidfile is not created or erlang node is not started within +.Fl -timeout +the command will fail. +Default timeout is 10 seconds. +.Pp +A suitable pid file is created by the +.Xr rabbitmq-server 8 +script. +By default this is located in the Mnesia directory. +Modify the +.Ev RABBITMQ_PID_FILE +environment variable to change the location. +.Pp +For example, this command will return when the RabbitMQ node has started +up: +.sp +.Dl rabbitmqctl wait /var/run/rabbitmq/pid +.El +.\" ------------------------------------------------------------------ +.\" ## Cluster Operations +.\" ------------------------------------------------------------------ +.Ss Cluster management +.Bl -tag -width Ds +.\" ------------------------------------------------------------------ +.It Cm await_online_nodes Ar count +.Pp +Waits for +.Ar count +nodes to join the cluster +.Pp +For example, to wait for two RabbitMQ nodes to start: +.sp +.Dl rabbitmqctl await_online_nodes 2 +.\" ------------------------------------------------------------------ +.It Cm change_cluster_node_type Ar type +.Pp +Changes the type of the cluster node. +.Pp +The +.Ar type +must be one of the following: +.Bl -bullet -compact +.It +.Cm disc +.It +.Cm ram +.El +.Pp +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. +.Pp +For example, this command will turn a RAM node into a disc node: +.sp +.Dl rabbitmqctl change_cluster_node_type disc +.\" ------------------------------------------------------------------ +.It Cm cluster_status +.Pp +Displays all the nodes in the cluster grouped by node type, together +with the currently running nodes. +.Pp +For example, this command displays the nodes in the cluster: +.sp +.Dl rabbitmqctl cluster_status +.\" ------------------------------------------------------------------ +.It Cm force_boot +.Pp +Ensures that the node will start next time, even if it was not the last +to shut down. +.Pp +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. +.Pp +In such a case you can invoke +.Cm 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. +.Pp +If the last node to go down is permanently lost then you should use +.Cm forget_cluster_node Fl -offline +in preference to this command, as it will ensure that mirrored queues +which were mastered on the lost node get promoted. +.Pp +For example, this will force the node not to wait for other nodes next +time it is started: +.sp +.Dl rabbitmqctl force_boot +.\" ------------------------------------------------------------------ +.It Cm force_reset +.Pp +Forcefully returns a RabbitMQ node to its virgin state. +.Pp +The +.Cm force_reset +command differs from +.Cm 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. +.Pp +For +.Cm reset +and +.Cm force_reset +to succeed the RabbitMQ application must have been stopped, e.g. with +.Cm stop_app . +.Pp +For example, to reset the RabbitMQ node: +.sp +.Dl rabbitmqctl force_reset +.\" ------------------------------------------------------------------ +.It Cm forget_cluster_node Op Fl -offline +.Bl -tag -width Ds +.It Fl -offline +Enables node removal from an offline node. +This is only useful in the situation where all the nodes are offline and +the last node to go down cannot be brought online, thus preventing the +whole cluster from starting. +It should not be used in any other circumstances since it can lead to +inconsistencies. +.El +.Pp +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 +.Fl -offline +flag. +.Pp +When using the +.Fl -offline +flag , +.Nm +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. +.Pp +For example, this command will remove the node +.Qq rabbit@stringer +from the node +.Qq hare@mcnulty : +.sp +.Dl rabbitmqctl -n hare@mcnulty forget_cluster_node rabbit@stringer +.\" ------------------------------------------------------------------ +.It Cm join_cluster Ar seed-node Op Fl -ram +.Bl -tag -width Ds +.It Ar seed-node +Existing cluster member (seed node) to cluster with. +.It Fl -ram +If provided, the node will join the cluster as a RAM node. +RAM node use is discouraged. Use only if you understand why +exactly you need to use them. +.El +.Pp +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 +.Cm stop_app . +.Pp +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. +.Pp +The node will be a disc node by default. +If you wish to create a RAM node, provide the +.Fl -ram +flag. +.Pp +After executing the +.Cm 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. +.Pp +To leave a cluster, +.Cm reset +the node. +You can also remove nodes remotely with the +.Cm forget_cluster_node +command. +.Pp +For example, this command instructs the RabbitMQ node to join the cluster that +.Qq hare@elena +is part of, as a ram node: +.sp +.Dl rabbitmqctl join_cluster hare@elena --ram +.Pp +To learn more, see the +.Lk https://www.rabbitmq.com/clustering.html "RabbitMQ Clustering guide". +.\" ------------------------------------------------------------------ +.It Cm rename_cluster_node Ar oldnode1 Ar newnode1 Op Ar oldnode2 Ar newnode2 ... +.Pp +Supports renaming of cluster nodes in the local database. +.Pp +This subcommand causes +.Nm +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. +.Pp +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. +.Pp +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). +.Pp +For example, this command will rename the node +.Qq rabbit@misshelpful +to the node +.Qq rabbit@cordelia +.sp +.Dl rabbitmqctl rename_cluster_node rabbit@misshelpful rabbit@cordelia +.Pp +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: +.sp +.Bl -enum -compact +.It +Stop the node: +.sp +.Dl rabbitmqctl stop rabbit@misshelpful +.sp +.It +Rename the node in the local database: +.sp +.Dl rabbitmqctl rename_cluster_node rabbit@misshelpful rabbit@cordelia +.sp +.It +Rename the local database directories (note, you do not need to do this +if you have set the RABBITMQ_MNESIA_DIR environment variable): +.sp +.Bd -literal -offset indent -compact +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 +.Ed +.sp +.It +If node name is configured e.g. using +.Ar /etc/rabbitmq/rabbitmq-env.conf +it has also be updated there. +.sp +.It +Start the node when ready +.El +.\" ------------------------------------------------------------------ +.It Cm update_cluster_nodes Ar clusternode +.Bl -tag -width Ds +.It Ar clusternode +The node to consult for up-to-date information. +.El +.Pp +Instructs an already clustered node to contact +.Ar clusternode +to cluster when booting up. +This is different from +.Cm join_cluster +since it does not join any cluster - it checks that the node is already +in a cluster with +.Ar clusternode . +.Pp +The need for this command is motivated by the fact that clusters can +change while a node is offline. +Consider a situation where node +.Va rabbit@A +and +.Va rabbit@B +are clustered. +.Va rabbit@A +goes down, +.Va rabbit@C +clusters with +.Va rabbit@B , +and then +.Va rabbit@B +leaves the cluster. +When +.Va rabbit@A +starts back up, it'll try to contact +.Va rabbit@B , +but this will fail since +.Va rabbit@B +is not in the cluster anymore. +The following command will rename node +.Va rabbit@B +to +.Va rabbit@C +on node +.Va rabbitA +.sp +.Dl update_cluster_nodes -n Va rabbit@A Va rabbit@B Va rabbit@C +.Pp +To learn more, see the +.Lk https://www.rabbitmq.com/clustering.html "RabbitMQ Clustering guide" +.El +.\" ------------------------------------------------------------------ +.\" ## Classic Mirrored Queues +.\" ------------------------------------------------------------------ +.Ss Replication +.Bl -tag -width Ds +.\" ------------------------------------------------------------------ +.It Cm sync_queue Oo Fl p Ar vhost Oc Ar queue +.Bl -tag -width Ds +.It Ar queue +The name of the queue to synchronise. +.El +.Pp +Instructs a mirrored queue with unsynchronised mirrors (follower replicas) +to synchronise them. +The queue will block while synchronisation takes place (all publishers +to and consumers using the queue will block or temporarily see no activity). +This command can only be used with mirrored queues. +To learn more, see the +.Lk https://www.rabbitmq.com/ha.html "RabbitMQ Mirroring guide" +.Pp +Note that queues with unsynchronised replicas and active consumers +will become synchronised eventually (assuming that consumers make progress). +This command is primarily useful for queues which do not have active consumers. +.\" ------------------------------------------------------------------ +.It Cm cancel_sync_queue Oo Fl p Ar vhost Oc Ar queue +.Bl -tag -width Ds +.It Ar queue +The name of the queue to cancel synchronisation for. +.El +.Pp +Instructs a synchronising mirrored queue to stop synchronising itself. +.El +.\" ------------------------------------------------------------------ +.\" ## User management +.\" ------------------------------------------------------------------ +.Ss User Management +Note that all user management commands +.Nm +only can manage users in the internal RabbitMQ database. +Users from any alternative authentication backends such as LDAP cannot be inspected +or managed with those commands. +.Nm . +.Bl -tag -width Ds +.\" ------------------------------------------------------------------ +.It Cm add_user Ar username Ar password +.Bl -tag -width Ds +.It Ar username +The name of the user to create. +.It Ar password +The password the created user will use to log in to the broker. +.El +.Pp +For example, this command instructs the RabbitMQ broker to create a (non-administrative) user named +.Qq janeway +with (initial) password +.Qq changeit : +.sp +.Dl rabbitmqctl add_user janeway changeit +.\" ------------------------------------------------------------------ +.It Cm authenticate_user Ar username Ar password +.Bl -tag -width Ds +.It Ar username +The name of the user. +.It Ar password +The password of the user. +.El +.Pp +For example, this command instructs the RabbitMQ broker to authenticate the user named +.Qq janeway +with password +.Qq verifyit : +.sp +.Dl rabbitmqctl authenticate_user janeway verifyit +.\" ------------------------------------------------------------------ +.It Cm change_password Ar username Ar newpassword +.Bl -tag -width Ds +.It Ar username +The name of the user whose password is to be changed. +.It Ar newpassword +The new password for the user. +.El +.Pp +For example, this command instructs the RabbitMQ broker to change the +password for the user named +.Qq janeway +to +.Qq newpass : +.sp +.Dl rabbitmqctl change_password janeway newpass +.\" ------------------------------------------------------------------ +.It Cm clear_password Ar username +.Bl -tag -width Ds +.It Ar username +The name of the user whose password is to be cleared. +.El +.Pp +For example, this command instructs the RabbitMQ broker to clear the +password for the user named +.Qq janeway : +.sp +.Dl rabbitmqctl clear_password janeway +.Pp +This user now cannot log in with a password (but may be able to through +e.g. SASL EXTERNAL if configured). +.\" ------------------------------------------------------------------ +.It Cm delete_user Ar username +.Bl -tag -width Ds +.It Ar username +The name of the user to delete. +.El +.Pp +For example, this command instructs the RabbitMQ broker to delete the user named +.Qq janeway : +.sp +.Dl rabbitmqctl delete_user janeway +.\" ------------------------------------------------------------------ +.It Cm list_users +.Pp +Lists users. +Each result row will contain the user name followed by a list of the +tags set for that user. +.Pp +For example, this command instructs the RabbitMQ broker to list all users: +.sp +.Dl rabbitmqctl list_users +.\" ------------------------------------------------------------------ +.It Cm set_user_tags Ar username Op Ar tag ... +.Bl -tag -width Ds +.It Ar username +The name of the user whose tags are to be set. +.It Ar tag +Zero, one or more tags to set. +Any existing tags will be removed. +.El +.Pp +For example, this command instructs the RabbitMQ broker to ensure the user named +.Qq janeway +is an administrator: +.sp +.Dl rabbitmqctl set_user_tags janeway administrator +.Pp +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). +.Pp +This command instructs the RabbitMQ broker to remove any tags from the user named +.Qq janeway : +.sp +.Dl rabbitmqctl set_user_tags janeway +.El +.\" ------------------------------------------------------------------ +.\" ## Access Control +.\" ------------------------------------------------------------------ +.Ss Access control +.Bl -tag -width Ds +.\" ------------------------------------------------------------------ +.It Cm clear_permissions Oo Fl p Ar vhost Oc Ar username +.Bl -tag -width Ds +.It Ar vhost +The name of the virtual host to which to deny the user access, +defaulting to +.Qq / . +.It Ar username +The name of the user to deny access to the specified virtual host. +.El +.Pp +Sets user permissions. +.Pp +For example, this command instructs the RabbitMQ broker to deny the user +named +.Qq janeway +access to the virtual host called +.Qq my-vhost : +.sp +.Dl rabbitmqctl clear_permissions -p my-vhost janeway +.\" ------------------------------------------------------------------ +.It Cm clear_topic_permissions Oo Fl p Ar vhost Oc Ar username Oo Ar exchange Oc +.Bl -tag -width Ds +.It Ar vhost +The name of the virtual host to which to clear the topic permissions, +defaulting to +.Qq / . +.It Ar username +The name of the user to clear topic permissions to the specified virtual host. +.It Ar exchange +The name of the topic exchange to clear topic permissions, defaulting to all the +topic exchanges the given user has topic permissions for. +.El +.Pp +Clear user topic permissions. +.Pp +For example, this command instructs the RabbitMQ broker to remove topic permissions for user +named +.Qq janeway +for the topic exchange +.Qq amq.topic +in the virtual host called +.Qq my-vhost : +.sp +.Dl rabbitmqctl clear_topic_permissions -p my-vhost janeway amq.topic +.\" ------------------------------------------------------------------ +.It Cm list_permissions Op Fl p Ar vhost +.Bl -tag -width Ds +.It Ar vhost +The name of the virtual host for which to list the users that have been +granted access to it, and their permissions. +Defaults to +.Qq / . +.El +.Pp +Lists permissions in a virtual host. +.Pp +For example, this command instructs the RabbitMQ broker to list all the +users which have been granted access to the virtual host called +.Qq my-vhost , +and the permissions they have for operations on resources in that +virtual host. +Note that an empty string means no permissions granted: +.sp +.Dl rabbitmqctl list_permissions -p my-vhost +.\" ------------------------------------------------------------------ +.It Cm list_topic_permissions Op Fl p Ar vhost +.Bl -tag -width Ds +.It Ar vhost +The name of the virtual host for which to list the users topic permissions. +Defaults to +.Qq / . +.El +.Pp +Lists topic permissions in a virtual host. +.Pp +For example, this command instructs the RabbitMQ broker to list all the +users which have been granted topic permissions in the virtual host called +.Qq my-vhost: +.sp +.Dl rabbitmqctl list_topic_permissions -p my-vhost +.\" ------------------------------------------------------------------ +.It Cm list_user_permissions Ar username +.Bl -tag -width Ds +.It Ar username +The name of the user for which to list the permissions. +.El +.Pp +Lists user permissions. +.Pp +For example, this command instructs the RabbitMQ broker to list all the +virtual hosts to which the user named +.Qq janeway +has been granted access, and the permissions the user has for operations +on resources in these virtual hosts: +.sp +.Dl rabbitmqctl list_user_permissions janeway +.\" ------------------------------------------------------------------ +.It Cm list_user_topic_permissions Ar username +.Bl -tag -width Ds +.It Ar username +The name of the user for which to list the topic permissions. +.El +.Pp +Lists user topic permissions. +.Pp +For example, this command instructs the RabbitMQ broker to list all the +virtual hosts to which the user named +.Qq janeway +has been granted access, and the topic permissions the user has in these virtual hosts: +.sp +.Dl rabbitmqctl list_topic_user_permissions janeway +.\" ------------------------------------------------------------------ +.It Cm list_vhosts Op Ar vhostinfoitem ... +.Pp +Lists virtual hosts. +.Pp +The +.Ar 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. +.Ar vhostinfoitem +can take any value from the list that follows: +.Bl -tag -width Ds +.It Cm name +The name of the virtual host with non-ASCII characters escaped as in C. +.It Cm tracing +Whether tracing is enabled for this virtual host. +.El +.Pp +If no +.Ar vhostinfoitem +are specified then the vhost name is displayed. +.Pp +For example, this command instructs the RabbitMQ broker to list all +virtual hosts: +.sp +.Dl rabbitmqctl list_vhosts name tracing +.\" ------------------------------------------------------------------ +.It Cm set_permissions Oo Fl p Ar vhost Oc Ar user Ar conf Ar write Ar read +.Bl -tag -width Ds +.It Ar vhost +The name of the virtual host to which to grant the user access, +defaulting to +.Qq / . +.It Ar user +The name of the user to grant access to the specified virtual host. +.It Ar conf +A regular expression matching resource names for which the user is +granted configure permissions. +.It Ar write +A regular expression matching resource names for which the user is +granted write permissions. +.It Ar read +A regular expression matching resource names for which the user is +granted read permissions. +.El +.Pp +Sets user permissions. +.Pp +For example, this command instructs the RabbitMQ broker to grant the +user named +.Qq janeway +access to the virtual host called +.Qq my-vhost , +with configure permissions on all resources whose names starts with +.Qq janeway- , +and write and read permissions on all resources: +.sp +.Dl rabbitmqctl set_permissions -p my-vhost janeway Qo ^janeway-.* Qc Qo .* Qc Qq .* +.\" ------------------------------------------------------------------ +.It Cm set_topic_permissions Oo Fl p Ar vhost Oc Ar user Ar exchange Ar write Ar read +.Bl -tag -width Ds +.It Ar vhost +The name of the virtual host to which to grant the user access, +defaulting to +.Qq / . +.It Ar user +The name of the user the permissions apply to in the target virtual host. +.It Ar exchange +The name of the topic exchange the authorisation check will be applied to. +.It Ar write +A regular expression matching the routing key of the published message. +.It Ar read +A regular expression matching the routing key of the consumed message. +.El +.Pp +Sets user topic permissions. +.Pp +For example, this command instructs the RabbitMQ broker to let the +user named +.Qq janeway +publish and consume messages going through the +.Qq amp.topic +exchange of the +.Qq my-vhost +virtual host with a routing key starting with +.Qq janeway- : +.sp +.Dl rabbitmqctl set_topic_permissions -p my-vhost janeway amq.topic Qo ^janeway-.* Qc Qo ^janeway-.* Qc +.Pp +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 +.Qq ^{username}-.* : +.sp +.Dl rabbitmqctl set_topic_permissions -p my-vhost janeway amq.topic Qo ^{username}-.* Qc Qo ^{username}-.* Qc +.El +.\" ------------------------------------------------------------------ +.\" ## Monitoring and Observability +.\" ------------------------------------------------------------------ +.Ss Monitoring, observability and health checks +.Bl -tag -width Ds +.\" ------------------------------------------------------------------ +.It Cm environment +.Pp +Displays the name and value of each variable in the application +environment for each running application. +.\" ------------------------------------------------------------------ +.It Cm list_bindings Oo Fl p Ar vhost Oc Op Ar bindinginfoitem ... +.Pp +Returns binding details. +By default the bindings for the +.Qq / +virtual host are returned. +The +.Fl p +flag can be used to override this default. +.Pp +The +.Ar 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. +.Ar bindinginfoitem +can take any value from the list that follows: +.Bl -tag -width Ds +.It Cm source_name +The name of the source of messages to which the binding is attached. +With non-ASCII characters escaped as in C. +.It Cm source_kind +The kind of the source of messages to which the binding is attached. +Currently always exchange. +With non-ASCII characters escaped as in C. +.It Cm destination_name +The name of the destination of messages to which the binding is +attached. +With non-ASCII characters escaped as in C. +.It Cm destination_kind +The kind of the destination of messages to which the binding is +attached. +With non-ASCII characters escaped as in C. +.It Cm routing_key +The binding's routing key, with non-ASCII characters escaped as in C. +.It Cm arguments +The binding's arguments. +.El +.Pp +If no +.Ar bindinginfoitem +are specified then all above items are displayed. +.Pp +For example, this command displays the exchange name and queue name of +the bindings in the virtual host named +.Qq my-vhost +.sp +.Dl rabbitmqctl list_bindings -p my-vhost exchange_name queue_name +.\" ------------------------------------------------------------------ +.It Cm list_channels Op Ar channelinfoitem ... +.Pp +Returns information on all current channels, the logical containers +executing most AMQP commands. +This includes channels that are part of ordinary AMQP connections, and +channels created by various plug-ins and other extensions. +.Pp +The +.Ar 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. +.Ar channelinfoitem +can take any value from the list that follows: +.Bl -tag -width Ds +.It Cm pid +Id of the Erlang process associated with the connection. +.It Cm connection +Id of the Erlang process associated with the connection to which the +channel belongs. +.It Cm name +Readable name for the channel. +.It Cm number +The number of the channel, which uniquely identifies it within a +connection. +.It Cm user +Username associated with the channel. +.It Cm vhost +Virtual host in which the channel operates. +.It Cm transactional +True if the channel is in transactional mode, false otherwise. +.It Cm confirm +True if the channel is in confirm mode, false otherwise. +.It Cm consumer_count +Number of logical AMQP consumers retrieving messages via the channel. +.It Cm messages_unacknowledged +Number of messages delivered via this channel but not yet acknowledged. +.It Cm messages_uncommitted +Number of messages received in an as yet uncommitted transaction. +.It Cm acks_uncommitted +Number of acknowledgements received in an as yet uncommitted transaction. +.It Cm messages_unconfirmed +Number of published messages not yet confirmed. +On channels not in confirm mode, this remains 0. +.It Cm prefetch_count +QoS prefetch limit for new consumers, 0 if unlimited. +.It Cm global_prefetch_count +QoS prefetch limit for the entire channel, 0 if unlimited. +.El +.Pp +If no +.Ar channelinfoitem +are specified then pid, user, consumer_count, and +messages_unacknowledged are assumed. +.Pp +For example, this command displays the connection process and count of +unacknowledged messages for each channel: +.sp +.Dl rabbitmqctl list_channels connection messages_unacknowledged +.\" ------------------------------------------------------------------ +.It Cm list_ciphers +.Pp +Lists cipher suites supported by encoding commands. +.Pp +For example, this command instructs the RabbitMQ broker to list all +cipher suites supported by encoding commands: +.sp +.Dl rabbitmqctl list_ciphers +.\" ------------------------------------------------------------------ +.It Cm list_connections Op Ar connectioninfoitem ... +.Pp +Returns TCP/IP connection statistics. +.Pp +The +.Ar 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. +.Ar connectioninfoitem +can take any value from the list that follows: +.Bl -tag -width Ds +.It Cm pid +Id of the Erlang process associated with the connection. +.It Cm name +Readable name for the connection. +.It Cm port +Server port. +.It Cm host +Server hostname obtained via reverse DNS, or its IP address if reverse +DNS failed or was disabled. +.It Cm peer_port +Peer port. +.It Cm peer_host +Peer hostname obtained via reverse DNS, or its IP address if reverse DNS +failed or was not enabled. +.It Cm ssl +Boolean indicating whether the connection is secured with SSL. +.It Cm ssl_protocol +SSL protocol (e.g.\& +.Qq tlsv1 ) . +.It Cm ssl_key_exchange +SSL key exchange algorithm (e.g.\& +.Qq rsa ) . +.It Cm ssl_cipher +SSL cipher algorithm (e.g.\& +.Qq aes_256_cbc ) . +.It Cm ssl_hash +SSL hash function (e.g.\& +.Qq sha ) . +.It Cm peer_cert_subject +The subject of the peer's SSL certificate, in RFC4514 form. +.It Cm peer_cert_issuer +The issuer of the peer's SSL certificate, in RFC4514 form. +.It Cm peer_cert_validity +The period for which the peer's SSL certificate is valid. +.It Cm state +Connection state; one of: +.Bl -bullet -compact +.It +starting +.It +tuning +.It +opening +.It +running +.It +flow +.It +blocking +.It +blocked +.It +closing +.It +closed +.El +.It Cm channels +Number of channels using the connection. +.It Cm protocol +Version of the AMQP protocol in use; currently one of: +.Bl -bullet -compact +.It +{0,9,1} +.It +{0,8,0} +.El +.Pp +Note that if a client requests an AMQP 0-9 connection, we treat it as +AMQP 0-9-1. +.It Cm auth_mechanism +SASL authentication mechanism used, such as +.Qq PLAIN . +.It Cm user +Username associated with the connection. +.It Cm vhost +Virtual host name with non-ASCII characters escaped as in C. +.It Cm timeout +Connection timeout / negotiated heartbeat interval, in seconds. +.It Cm frame_max +Maximum frame size (bytes). +.It Cm channel_max +Maximum number of channels on this connection. +.It Cm client_properties +Informational properties transmitted by the client during connection +establishment. +.It Cm recv_oct +Octets received. +.It Cm recv_cnt +Packets received. +.It Cm send_oct +Octets send. +.It Cm send_cnt +Packets sent. +.It Cm send_pend +Send queue size. +.It Cm connected_at +Date and time this connection was established, as timestamp. +.El +.Pp +If no +.Ar connectioninfoitem +are specified then user, peer host, peer port, time since flow control +and memory block state are displayed. +.Pp +For example, this command displays the send queue size and server port +for each connection: +.sp +.Dl rabbitmqctl list_connections send_pend port +.\" ------------------------------------------------------------------ +.It Cm list_consumers Op Fl p Ar vhost +.Pp +Lists consumers, i.e. subscriptions to a queue\'s message stream. +Each line printed shows, separated by tab characters, the name of +the queue subscribed to, the id of the channel process via which the +subscription was created and is managed, the consumer tag which uniquely +identifies the subscription within a channel, a boolean indicating +whether acknowledgements are expected for messages delivered to this +consumer, an integer indicating the prefetch limit (with 0 meaning +.Qq none ) , +and any arguments for this consumer. +.\" ------------------------------------------------------------------ +.It Cm list_exchanges Oo Fl p Ar vhost Oc Op Ar exchangeinfoitem ... +.Pp +Returns exchange details. +Exchange details of the +.Qq / +virtual host are returned if the +.Fl p +flag is absent. +The +.Fl p +flag can be used to override this default. +.Pp +The +.Ar 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. +.Ar exchangeinfoitem +can take any value from the list that follows: +.Bl -tag -width Ds +.It Cm name +The name of the exchange with non-ASCII characters escaped as in C. +.It Cm type +The exchange type, such as: +.Bl -bullet -compact +.It +direct +.It +topic +.It +headers +.It +fanout +.El +.It Cm durable +Whether or not the exchange survives server restarts. +.It Cm auto_delete +Whether the exchange will be deleted automatically when no longer used. +.It Cm internal +Whether the exchange is internal, i.e. cannot be directly published to +by a client. +.It Cm arguments +Exchange arguments. +.It Cm policy +Policy name for applying to the exchange. +.El +.Pp +If no +.Ar exchangeinfoitem +are specified then exchange name and type are displayed. +.Pp +For example, this command displays the name and type for each exchange +of the virtual host named +.Qq my-vhost : +.sp +.Dl rabbitmqctl list_exchanges -p my-vhost name type +.\" ------------------------------------------------------------------ +.It Cm list_hashes +.Pp +Lists hash functions supported by encoding commands. +.Pp +For example, this command instructs the RabbitMQ broker to list all hash +functions supported by encoding commands: +.sp +.Dl rabbitmqctl list_hashes +.\" ------------------------------------------------------------------ +.It Cm list_queues Oo Fl p Ar vhost Oc Oo Fl -offline | Fl -online | Fl -local Oc Op Ar queueinfoitem ... +.Pp +Returns queue details. +Queue details of the +.Qq / +virtual host are returned if the +.Fl p +flag is absent. +The +.Fl p +flag can be used to override this default. +.Pp +Displayed queues can be filtered by their status or location using one +of the following mutually exclusive options: +.Bl -tag -width Ds +.It Fl -offline +List only those durable queues that are not currently available (more +specifically, their master node isn't). +.It Fl -online +List queues that are currently available (their master node is). +.It Fl -local +List only those queues whose master process is located on the current +node. +.El +.Pp +The +.Ar 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. +.Ar queueinfoitem +can take any value from the list that follows: +.Bl -tag -width Ds +.It Cm name +The name of the queue with non\-ASCII characters escaped as in C. +.It Cm durable +Whether or not the queue survives server restarts. +.It Cm auto_delete +Whether the queue will be deleted automatically when no longer used. +.It Cm arguments +Queue arguments. +.It Cm policy +Effective policy name for the queue. +.It Cm pid +Erlang process identifier of the queue. +.It Cm owner_pid +Id of the Erlang process of the connection which is the +exclusive owner of the queue. +Empty if the queue is non-exclusive. +.It Cm exclusive +True if queue is exclusive (i.e. has owner_pid), false otherwise. +.It Cm exclusive_consumer_pid +Id of the Erlang process representing the channel of the exclusive +consumer subscribed to this queue. +Empty if there is no exclusive consumer. +.It Cm exclusive_consumer_tag +Consumer tag of the exclusive consumer subscribed to this queue. +Empty if there is no exclusive consumer. +.It Cm messages_ready +Number of messages ready to be delivered to clients. +.It Cm messages_unacknowledged +Number of messages delivered to clients but not yet acknowledged. +.It Cm messages +Sum of ready and unacknowledged messages (queue depth). +.It Cm messages_ready_ram +Number of messages from messages_ready which are resident in ram. +.It Cm messages_unacknowledged_ram +Number of messages from messages_unacknowledged which are resident in +ram. +.It Cm messages_ram +Total number of messages which are resident in ram. +.It Cm messages_persistent +Total number of persistent messages in the queue (will always be 0 for +transient queues). +.It Cm message_bytes +Sum of the size of all message bodies in the queue. +This does not include the message properties (including headers) or any +overhead. +.It Cm message_bytes_ready +Like +.Cm message_bytes +but counting only those messages ready to be delivered to clients. +.It Cm message_bytes_unacknowledged +Like +.Cm message_bytes +but counting only those messages delivered to clients but not yet +acknowledged. +.It Cm message_bytes_ram +Like +.Cm message_bytes +but counting only those messages which are currently held in RAM. +.It Cm message_bytes_persistent +Like +.Cm message_bytes +but counting only those messages which are persistent. +.It Cm head_message_timestamp +The timestamp property of the first message in the queue, if present. +Timestamps of messages only appear when they are in the paged-in state. +.It Cm disk_reads +Total number of times messages have been read from disk by this queue +since it started. +.It Cm disk_writes +Total number of times messages have been written to disk by this queue +since it started. +.It Cm consumers +Number of consumers. +.It Cm consumer_utilisation +Fraction of the time (between 0.0 and 1.0) that the queue is able to +immediately deliver messages to consumers. +This can be less than 1.0 if consumers are limited by network congestion +or prefetch count. +.It Cm memory +Bytes of memory allocated by the runtime for the +queue, including stack, heap and internal structures. +.It Cm slave_pids +If the queue is mirrored, this lists the IDs of the mirrors (follower replicas). +To learn more, see the +.Lk https://www.rabbitmq.com/ha.html "RabbitMQ Mirroring guide" +.It Cm synchronised_slave_pids +If the queue is mirrored, this gives the IDs of the mirrors (follower replicas) which +are synchronised with the master (leader). To learn more, see the +.Lk https://www.rabbitmq.com/ha.html "RabbitMQ Mirroring guide" +.It Cm state +The state of the queue. +Normally +.Qq running , +but may be +.Qq Bro syncing, Ar message_count Brc +if the queue is synchronising. +.Pp +Queues which are located on cluster nodes that are currently down will +be shown with a status of +.Qq down +(and most other +.Ar queueinfoitem +will be unavailable). +.El +.Pp +If no +.Ar queueinfoitem +are specified then queue name and depth are displayed. +.Pp +For example, this command displays the depth and number of consumers for +each queue of the virtual host named +.Qq my-vhost +.sp +.Dl rabbitmqctl list_queues -p my-vhost messages consumers +.\" ------------------------------------------------------------------ +.It Cm list_unresponsive_queues Oo Fl -local Oc Oo Fl -queue-timeout Ar milliseconds Oc Oo Ar column ... Oc Op Fl -no-table-headers +.Pp +Tests queues to respond within timeout. Lists those which did not respond +.Pp +For example, this command lists only those unresponsive queues whose master process +is located on the current node. +.Sp +.Dl rabbitmqctl list_unresponsive_queues --local name +.\" ------------------------------------------------------------------ +.It Cm ping +.Pp +Checks that the node OS process is up, registered with EPMD and CLI tools can authenticate with it +.Pp +Example: +.Dl rabbitmqctl ping -n rabbit@hostname +.\" ------------------------------------------------------------------ +.It Cm report +.Pp +Generate a server status report containing a concatenation of all server +status information for support purposes. +The output should be redirected to a file when accompanying a support +request. +.Pp +For example, this command creates a server report which may be attached +to a support request email: +.sp +.Dl rabbitmqctl report > server_report.txt +.\" ------------------------------------------------------------------ +.It Cm schema_info Oo Fl -no-table-headers Oc Op Ar column ... +.Pp +Lists schema database tables and their properties +.Pp +For example, this command lists the table names and their active replicas: +.sp +.Dl rabbitmqctl schema_info name active_replicas +.\" ------------------------------------------------------------------ +.It Cm status +.Pp +Displays broker status information such as the running applications on +the current Erlang node, RabbitMQ and Erlang versions, OS name, memory +and file descriptor statistics. +(See the +.Cm cluster_status +command to find out which nodes are clustered and running.) +.Pp +For example, this command displays information about the RabbitMQ +broker: +.sp +.Dl rabbitmqctl status +.El +.\" ------------------------------------------------------------------ +.\" ## Runtime Parameters and Policies +.\" ------------------------------------------------------------------ +.Ss Runtime Parameters and Policies +Certain features of RabbitMQ (such as the Federation plugin) are +controlled by dynamic, cluster-wide +.Em 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 a valid JSON document. +A global parameter consists of a name and value. +The name is a string and the value is an arbitrary Erlang data structure. +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. +.Pp +Policies is a feature built on top of runtime 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. +.Bl -tag -width Ds +.\" ------------------------------------------------------------------ +.It Cm clear_global_parameter Ar name +.Pp +Clears a global runtime parameter. +This is similar to +.Cm clear_parameter +but the key-value pair isn't tied to a virtual host. +.Bl -tag -width Ds +.It Ar name +The name of the global runtime parameter being cleared. +.El +.Pp +For example, this command clears the global runtime parameter +.Qq mqtt_default_vhosts : +.sp +.Dl rabbitmqctl clear_global_parameter mqtt_default_vhosts +.\" ------------------------------------------------------------------ +.It Cm clear_parameter Oo Fl p Ar vhost Oc Ar component_name Ar key +.Pp +Clears a parameter. +.Bl -tag -width Ds +.It Ar component_name +The name of the component for which the parameter is being cleared. +.It Ar name +The name of the parameter being cleared. +.El +.Pp +For example, this command clears the parameter +.Qq node01 +for the +.Qq federation-upstream +component in the default virtual host: +.sp +.Dl rabbitmqctl clear_parameter federation-upstream node01 +.\" ------------------------------------------------------------------ +.It Cm list_global_parameters +.Pp +Lists all global runtime parameters. +This is similar to +.Cm list_parameters +but the global runtime parameters are not tied to any virtual host. +.Pp +For example, this command lists all global parameters: +.sp +.Dl rabbitmqctl list_global_parameters +.\" ------------------------------------------------------------------ +.It Cm list_parameters Op Fl p Ar vhost +.Pp +Lists all parameters for a virtual host. +.Pp +For example, this command lists all parameters in the default virtual +host: +.sp +.Dl rabbitmqctl list_parameters +.\" ------------------------------------------------------------------ +.It Cm set_global_parameter Ar name Ar value +.Pp +Sets a global runtime parameter. +This is similar to +.Cm set_parameter +but the key-value pair isn't tied to a virtual host. +.Bl -tag -width Ds +.It Ar name +The name of the global runtime parameter being set. +.It Ar value +The value for the global runtime parameter, as a JSON term. +In most shells you are very likely to need to quote this. +.El +.Pp +For example, this command sets the global runtime parameter +.Qq mqtt_default_vhosts +to the JSON term {"O=client,CN=guest":"/"}: +.sp +.Dl rabbitmqctl set_global_parameter mqtt_default_vhosts '{"O=client,CN=guest":"/"}' +.\" ------------------------------------------------------------------ +.It Cm set_parameter Oo Fl p Ar vhost Oc Ar component_name Ar name Ar value +.Pp +Sets a parameter. +.Bl -tag -width Ds +.It Ar component_name +The name of the component for which the parameter is being set. +.It Ar name +The name of the parameter being set. +.It Ar value +The value for the parameter, as a JSON term. +In most shells you are very likely to need to quote this. +.El +.Pp +For example, this command sets the parameter +.Qq node01 +for the +.Qq federation-upstream +component in the default virtual host to the following JSON +.Qq guest : +.sp +.Dl rabbitmqctl set_parameter federation-upstream node01 '{"uri":"amqp://user:password@server/%2F","ack-mode":"on-publish"}' +.\" ------------------------------------------------------------------ +.It Cm list_policies Op Fl p Ar vhost +.Pp +Lists all policies for a virtual host. +.Pp +For example, this command lists all policies in the default virtual +host: +.sp +.Dl rabbitmqctl list_policies +.\" ------------------------------------------------------------------ +.It Cm set_operator_policy Oo Fl p Ar vhost Oc Oo Fl -priority Ar priority Oc Oo Fl -apply-to Ar apply-to Oc Ar name Ar pattern Ar definition +.Pp +Sets an operator policy that overrides a subset of arguments in user +policies. +Arguments are identical to those of +.Cm set_policy . +.Pp +Supported arguments are: +.Bl -bullet -compact +.It +expires +.It +message-ttl +.It +max-length +.It +max-length-bytes +.El +.\" ------------------------------------------------------------------ +.It Cm set_policy Oo Fl p Ar vhost Oc Oo Fl -priority Ar priority Oc Oo Fl -apply-to Ar apply-to Oc Ar name Ar pattern Ar definition +.Pp +Sets a policy. +.Bl -tag -width Ds +.It Ar name +The name of the policy. +.It Ar pattern +The regular expression, which when matches on a given resources causes +the policy to apply. +.It Ar definition +The definition of the policy, as a JSON term. +In most shells you are very likely to need to quote this. +.It Ar priority +The priority of the policy as an integer. +Higher numbers indicate greater precedence. +The default is 0. +.It Ar apply-to +Which types of object this policy should apply to. +Possible values are: +.Bl -bullet -compact +.It +queues +.It +exchanges +.It +all +.El +The default is +.Cm all .. +.El +.Pp +For example, this command sets the policy +.Qq federate-me +in the default virtual host so that built-in exchanges are federated: +.sp +.Dl rabbitmqctl set_policy federate-me "^amq." '{"federation-upstream-set":"all"}' +.\" ------------------------------------------------------------------ +.It Cm clear_policy Oo Fl p Ar vhost Oc Ar name +.Pp +Clears a policy. +.Bl -tag -width Ds +.It Ar name +The name of the policy being cleared. +.El +.Pp +For example, this command clears the +.Qq federate-me +policy in the default virtual host: +.sp +.Dl rabbitmqctl clear_policy federate-me +.\" ------------------------------------------------------------------ +.It Cm clear_operator_policy Oo Fl p Ar vhost Oc Ar name +.Pp +Clears an operator policy. +Arguments are identical to those of +.Cm clear_policy . +.\" ------------------------------------------------------------------ +.It Cm list_operator_policies Op Fl p Ar vhost +.Pp +Lists operator policy overrides for a virtual host. +Arguments are identical to those of +.Cm list_policies . +.El +.\" ------------------------------------------------------------------ +.\" ## Virtual Host Management +.\" ------------------------------------------------------------------ +.Ss Virtual hosts +Note that +.Nm +manages the RabbitMQ internal user database. +Permissions for users from any alternative authorisation backend will +not be visible to +.Nm . +.Bl -tag -width Ds +.\" ------------------------------------------------------------------ +.It Cm add_vhost Ar vhost +.Bl -tag -width Ds +.It Ar vhost +The name of the virtual host entry to create. +.El +.Pp +Creates a virtual host. +.Pp +For example, this command instructs the RabbitMQ broker to create a new +virtual host called +.Qq test : +.Pp +.Dl rabbitmqctl add_vhost test +.\" ------------------------------------------------------------------ +.It Cm clear_vhost_limits Op Fl p Ar vhost +.Pp +Clears virtual host limits. +.Pp +For example, this command clears vhost limits in vhost +.Qq qa_env : +.sp +.Dl rabbitmqctl clear_vhost_limits -p qa_env +.\" ------------------------------------------------------------------ +.It Cm delete_vhost Ar vhost +.Bl -tag -width Ds +.It Ar vhost +The name of the virtual host entry to delete. +.El +.Pp +Deletes a virtual host. +.Pp +Deleting a virtual host deletes all its exchanges, queues, bindings, +user permissions, parameters and policies. +.Pp +For example, this command instructs the RabbitMQ broker to delete the +virtual host called +.Qq test : +.sp +.Dl rabbitmqctl delete_vhost a-vhost +.\" ------------------------------------------------------------------ +.It Cm list_vhost_limits Oo Fl p Ar vhost Oc Oo Fl -global Oc Op Fl -no-table-headers +.Pp +Displays configured virtual host limits. +.Bl -tag -width Ds +.It Fl -global +Show limits for all vhosts. +Suppresses the +.Fl p +parameter. +.El +.\" ------------------------------------------------------------------ +.It Cm restart_vhost Ar vhost +.Bl -tag -width Ds +.It Ar vhost +The name of the virtual host entry to restart. +.El +.Pp +Restarts a failed vhost data stores and queues. +.Pp +For example, this command instructs the RabbitMQ broker to restart a +virtual host called +.Qq test : +.Pp +.Dl rabbitmqctl restart_vhost test +.\" ------------------------------------------------------------------ +.It Cm set_vhost_limits Oo Fl p Ar vhost Oc Ar definition +.Pp +Sets virtual host limits. +.Bl -tag -width Ds +.It Ar definition +The definition of the limits, as a JSON term. +In most shells you are very likely to need to quote this. +.Pp +Recognised limits are: +.Bl -bullet -compact +.It +max-connections +.It +max-queues +.El +.Pp +Use a negative value to specify "no limit". +.El +.Pp +For example, this command limits the max number of concurrent +connections in vhost +.Qq qa_env +to 64: +.sp +.Dl rabbitmqctl set_vhost_limits -p qa_env '{"max-connections": 64}' +.Pp +This command limits the max number of queues in vhost +.Qq qa_env +to 256: +.sp +.Dl rabbitmqctl set_vhost_limits -p qa_env '{"max-queues": 256}' +.Pp +This command clears the max number of connections limit in vhost +.Qq qa_env : +.sp +.Dl rabbitmqctl set_vhost_limits -p qa_env '{"max\-connections": \-1}' +.Pp +This command disables client connections in vhost +.Qq qa_env : +.sp +.Dl rabbitmqctl set_vhost_limits -p qa_env '{"max-connections": 0}' +.\" ------------------------------------------------------------------ +.It Cm trace_off Op Fl p Ar vhost +.Bl -tag -width Ds +.It Ar vhost +The name of the virtual host for which to stop tracing. +.El +.Pp +Stops tracing. +.\" ------------------------------------------------------------------ +.It Cm trace_on Op Fl p Ar vhost +.Bl -tag -width Ds +.It Ar vhost +The name of the virtual host for which to start tracing. +.El +.Pp +Starts tracing. +Note that the trace state is not persistent; it will revert to being off +if the node is restarted. +.El +.\" ------------------------------------------------------------------ +.\" ## Configuration +.\" ------------------------------------------------------------------ +.Ss Configuration +.Bl -tag -width Ds +.\" ------------------------------------------------------------------ +.It Cm decode Ar value Ar passphrase Oo Fl -cipher Ar cipher Oc Oo Fl -hash Ar hash Oc Op Fl -iterations Ar iterations +.Bl -tag -width Ds +.It Ar value Ar passphrase +Value to decrypt (as produced by the encode command) and passphrase. +.Pp +For example: +.sp +.Dl rabbitmqctl decode '{encrypted, <<"...">>}' mypassphrase +.It Fl -cipher Ar cipher Fl -hash Ar hash Fl -iterations Ar iterations +Options to specify the decryption settings. +They can be used independently. +.Pp +For example: +.sp +.Dl rabbitmqctl decode --cipher blowfish_cfb64 --hash sha256 --iterations 10000 '{encrypted,<<"...">>} mypassphrase +.El +.\" ------------------------------------------------------------------ +.It Cm encode Ar value Ar passphrase Oo Fl -cipher Ar cipher Oc Oo Fl -hash Ar hash Oc Op Fl -iterations Ar iterations +.Bl -tag -width Ds +.It Ar value Ar passphrase +Value to encrypt and passphrase. +.Pp +For example: +.sp +.Dl rabbitmqctl encode '<<"guest">>' mypassphrase +.It Fl -cipher Ar cipher Fl -hash Ar hash Fl -iterations Ar iterations +Options to specify the encryption settings. +They can be used independently. +.Pp +For example: +.sp +.Dl rabbitmqctl encode --cipher blowfish_cfb64 --hash sha256 --iterations 10000 '<<"guest">>' mypassphrase +.El +.\" ------------------------------------------------------------------ +.It Cm set_cluster_name Ar name +.Pp +Sets the cluster name to +.Ar name . +The cluster name is announced to clients on connection, and used by the +federation and shovel plugins to record where a message has been. +The cluster name is by default derived from the hostname of the first +node in the cluster, but can be changed. +.Pp +For example, this sets the cluster name to +.Qq london : +.sp +.Dl rabbitmqctl set_cluster_name london +.\" ------------------------------------------------------------------ +.It Cm set_disk_free_limit Ar disk_limit +.Bl -tag -width Ds +.It Ar disk_limit +Lower bound limit as an integer in bytes or a string with memory unit symbols +(see vm_memory_high_watermark), e.g. 512M or 1G. +Once free disk space reaches the limit, a disk alarm will be set. +.El +.\" ------------------------------------------------------------------ +.It Cm set_disk_free_limit mem_relative Ar fraction +.Bl -tag -width Ds +.It Ar fraction +Limit relative to the total amount available RAM as a non-negative +floating point number. +Values lower than 1.0 can be dangerous and should be used carefully. +.El +.\" ------------------------------------------------------------------ +.It Cm set_log_level Op Ar log_level +.Pp +Sets log level in the running node +.Pp +Supported +.Ar type +values are: +.Bl -bullet -compact +.It +debug +.It +info +.It +warning +.It +error +.It +none +.El +.Pp +Example: +.Sp +.Dl rabbitmqctl log_level debug +.\" ------------------------------------------------------------------ +.It Cm set_vm_memory_high_watermark Ar fraction +.Bl -tag -width Ds +.It Ar fraction +The new memory threshold fraction at which flow control is triggered, as +a floating point number greater than or equal to 0. +.El +.\" ------------------------------------------------------------------ +.It Cm set_vm_memory_high_watermark Oo absolute Oc Ar memory_limit +.Bl -tag -width Ds +.It Ar memory_limit +The new memory limit at which flow control is triggered, expressed in +bytes as an integer number greater than or equal to 0 or as a string +with memory unit symbol(e.g. 512M or 1G). +Available unit symbols are: +.Bl -tag -width Ds +.It Cm k , Cm kiB +kibibytes (2^10 bytes) +.It Cm M , Cm MiB +mebibytes (2^20 bytes) +.It Cm G , Cm GiB +gibibytes (2^30 bytes) +.It Cm kB +kilobytes (10^3 bytes) +.It Cm MB +megabytes (10^6 bytes) +.It Cm GB +gigabytes (10^9 bytes) +.El +.El +.El +.\" ------------------------------------------------------------------ +.\" ## Feature Flags +.\" ------------------------------------------------------------------ +.Ss Feature flags +.Bl -tag -width Ds +.\" ------------------------------------------------------------------ +.It Cm enable_feature_flag Ar feature_flag +.Pp +Enables a feature flag on the target node. +.Pp +Example: +.Sp +.Dl rabbitmqctl enable_feature_flag quorum_queue +.\" ------------------------------------------------------------------ +.It Cm list_feature_flags Op Ar column ... +.Pp +Lists feature flags +.Pp +Supported +.Ar column +values are: +.Bl -bullet -compact +.It +name +.It +state +.It +stability +.It +provided_by +.It +desc +.It +doc_url +.El +.Pp +Example: +.Sp +.Dl rabbitmqctl list_feature_flags name state +.El +.\" ------------------------------------------------------------------ +.\" ## Misc Operations +.\" ------------------------------------------------------------------ +.Ss Connection Operations +.Bl -tag -width Ds +.\" ------------------------------------------------------------------ +.It Cm close_all_connections Oo Fl p Ar vhost Oc Oo Fl -global Oc Oo Fl -per-connection-delay Ar delay Oc Oo Fl -limit Ar limit Oc Ar explanation +.Bl -tag -width Ds +.It Fl p Ar vhost +The name of the virtual host for which connections should be closed. +Ignored when +.Fl -global +is specified. +.It Fl -global +If connections should be close for all vhosts. +Overrides +.Fl p +.It Fl -per-connection-delay Ar delay +Time in milliseconds to wait after each connection closing. +.It Fl -limit Ar limit +Number of connection to close. +Only works per vhost. +Ignored when +.Fl -global +is specified. +.It Ar explanation +Explanation string. +.El +.Pp +Instructs the broker to close all connections for the specified vhost or entire RabbitMQ node. +.Pp +For example, this command instructs the RabbitMQ broker to close 10 connections on +.Qq qa_env +vhost, passing the explanation +.Qq Please close : +.sp +.Dl rabbitmqctl close_all_connections -p qa_env --limit 10 'Please close' +.Pp +This command instructs broker to close all connections to the node: +.sp +.Dl rabbitmqctl close_all_connections --global +.sp +.\" ------------------------------------------------------------------ +.It Cm close_connection Ar connectionpid Ar explanation +.Bl -tag -width Ds +.It Ar connectionpid +Id of the Erlang process associated with the connection to close. +.It Ar explanation +Explanation string. +.El +.Pp +Instructs the broker to close the connection associated with the Erlang +process id +.Ar connectionpid +(see also the +.Cm list_connections +command), passing the +.Ar explanation +string to the connected client as part of the AMQP connection shutdown +protocol. +.Pp +For example, this command instructs the RabbitMQ broker to close the connection associated with the Erlang process id +.Qq <rabbit@tanto.4262.0> , +passing the explanation +.Qq go away +to the connected client: +.sp +.Dl rabbitmqctl close_connection Qo <rabbit@tanto.4262.0> Qc Qq go away +.El +.\" ------------------------------------------------------------------ +.\" ## Misc +.\" ------------------------------------------------------------------ +.Ss Misc +.Bl -tag -width Ds +.\" ------------------------------------------------------------------ +.It Cm eval Ar expression +.Pp +Evaluates an Erlang expression on the target node +.\" ------------------------------------------------------------------ +.\" ## Queue Operations +.\" ------------------------------------------------------------------ +.Ss Queue Operations +.Bl -tag -width Ds +.\" ------------------------------------------------------------------ +.It Cm delete_queue Ar queue_name Oo Fl -if-empty | Fl e Oc Op Fl -if-unused | Fl u +.Bl -tag -width Ds +.It Ar queue_name +The name of the queue to delete. +.It Ar --if-empty +Delete the queue if it is empty (has no messages ready for delivery) +.It Ar --if-unused +Delete the queue only if it has no consumers +.El +.Pp +Deletes a queue. +.\" ------------------------------------------------------------------ +.It Cm purge_queue Oo Fl p Ar vhost Oc Ar queue +.Bl -tag -width Ds +.It Ar queue +The name of the queue to purge. +.El +.Pp +Purges a queue (removes all messages in it). +.El +.\" ------------------------------------------------------------------------------------------------ +.Sh PLUGIN COMMANDS +.\" ------------------------------------------------------------------------------------------------ +RabbitMQ plugins can extend rabbitmqctl tool to add new commands when enabled. +Currently available commands can be found in +.Cm rabbitmqctl help +output. +Following commands are added by RabbitMQ plugins, available in default +distribution: +.\" ------------------------------------------------------------------ +.\" ## Shovel +.\" ------------------------------------------------------------------ +.Ss Shovel plugin +.Bl -tag -width Ds +.It Cm shovel_status +Prints a list of configured Shovels +.It Cm delete_shovel Oo Fl p Ar vhost Oc Ar name +Instructs the RabbitMQ node to delete the configured shovel by +.Ar name . +.El +.\" ------------------------------------------------------------------ +.\" ## Federation +.\" ------------------------------------------------------------------ +.Ss Federation plugin +.Bl -tag -width Ds +.It Cm federation_status Op Fl -only-down +Prints a list of federation links. +.Bl -tag -width Ds +.It Fl -only-down +Only list federation links which are not running. +.El +.It Cm restart_federation_link Ar link_id +Instructs the RabbitMQ node to restart the federation link with specified +.Ar link_id . +.El +.\" ------------------------------------------------------------------ +.\" ## AMQP 1.0 +.\" ------------------------------------------------------------------ +.Ss AMQP 1.0 plugin +.Bl -tag -width Ds +.It Cm list_amqp10_connections Op Ar amqp10_connectioninfoitem ... +Similar to the +.Cm list_connections +command, but returns fields which make sense for AMQP-1.0 connections. +.Ar 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. +.Ar amqp10_connectioninfoitem +can take any value from the list that follows: +.Bl -tag -width Ds +.It Cm pid +Id of the Erlang process associated with the connection. +.It Cm auth_mechanism +SASL authentication mechanism used, such as +.Qq PLAIN . +.It Cm host +Server hostname obtained via reverse DNS, or its IP address if reverse +DNS failed or was disabled. +.It Cm frame_max +Maximum frame size (bytes). +.It Cm timeout +Connection timeout / negotiated heartbeat interval, in seconds. +.It Cm user +Username associated with the connection. +.It Cm state +Connection state; one of: +.Bl -bullet -compact +.It +starting +.It +waiting_amqp0100 +.It +securing +.It +running +.It +blocking +.It +blocked +.It +closing +.It +closed +.El +.It Cm recv_oct +Octets received. +.It Cm recv_cnt +Packets received. +.It Cm send_oct +Octets send. +.It Cm send_cnt +Packets sent. +.It Cm ssl +Boolean indicating whether the connection is secured with SSL. +.It Cm ssl_protocol +SSL protocol (e.g.\& +.Qq tlsv1 ) . +.It Cm ssl_key_exchange +SSL key exchange algorithm (e.g.\& +.Qq rsa ) . +.It Cm ssl_cipher +SSL cipher algorithm (e.g.\& +.Qq aes_256_cbc ) . +.It Cm ssl_hash +SSL hash function (e.g.\& +.Qq sha ) . +.It Cm peer_cert_subject +The subject of the peer's SSL certificate, in RFC4514 form. +.It Cm peer_cert_issuer +The issuer of the peer's SSL certificate, in RFC4514 form. +.It Cm peer_cert_validity +The period for which the peer's SSL certificate is valid. +.It Cm node +The node name of the RabbitMQ node to which connection is established. +.El +.El +.\" ------------------------------------------------------------------ +.\" ## MQTT +.\" ------------------------------------------------------------------ +.Ss MQTT plugin +.Bl -tag -width Ds +.It Cm list_mqtt_connections Op Ar mqtt_connectioninfoitem +Similar to the +.Cm list_connections +command, but returns fields which make sense for MQTT connections. +.Ar 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. +.Ar mqtt_connectioninfoitem +can take any value from the list that follows: +.Bl -tag -width Ds +.It Cm host +Server hostname obtained via reverse DNS, or its IP address if reverse +DNS failed or was disabled. +.It Cm port +Server port. +.It Cm peer_host +Peer hostname obtained via reverse DNS, or its IP address if reverse DNS +failed or was not enabled. +.It Cm peer_port +Peer port. +.It Cm protocol +MQTT protocol version, which can be on of the following: +.Bl -bullet -compact +.It +{'MQTT', N/A} +.It +{'MQTT', 3.1.0} +.It +{'MQTT', 3.1.1} +.El +.It Cm channels +Number of channels using the connection. +.It Cm channel_max +Maximum number of channels on this connection. +.It Cm frame_max +Maximum frame size (bytes). +.It Cm client_properties +Informational properties transmitted by the client during connection +establishment. +.It Cm ssl +Boolean indicating whether the connection is secured with SSL. +.It Cm ssl_protocol +SSL protocol (e.g.\& +.Qq tlsv1 ) . +.It Cm ssl_key_exchange +SSL key exchange algorithm (e.g.\& +.Qq rsa ) . +.It Cm ssl_cipher +SSL cipher algorithm (e.g.\& +.Qq aes_256_cbc ) . +.It Cm ssl_hash +SSL hash function (e.g.\& +.Qq sha ) . +.It Cm conn_name +Readable name for the connection. +.It Cm connection_state +Connection state; one of: +.Bl -bullet -compact +.It +starting +.It +running +.It +blocked +.El +.It Cm connection +Id of the Erlang process associated with the internal amqp direct connection. +.It Cm consumer_tags +A tuple of consumer tags for QOS0 and QOS1. +.It Cm message_id +The last Packet ID sent in a control message. +.It Cm client_id +MQTT client identifier for the connection. +.It Cm clean_sess +MQTT clean session flag. +.It Cm will_msg +MQTT Will message sent in CONNECT frame. +.It Cm exchange +Exchange to route MQTT messages configured in rabbitmq_mqtt application environment. +.It Cm ssl_login_name +SSL peer cert auth name +.It Cm retainer_pid +Id of the Erlang process associated with retain storage for the connection. +.It Cm user +Username associated with the connection. +.It Cm vhost +Virtual host name with non-ASCII characters escaped as in C. +.El +.El +.\" ------------------------------------------------------------------ +.\" ## STOMP +.\" ------------------------------------------------------------------ +.Ss STOMP plugin +.Bl -tag -width Ds +.It Cm list_stomp_connections Op Ar stomp_connectioninfoitem +Similar to the +.Cm list_connections +command, but returns fields which make sense for STOMP connections. +.Ar 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. +.Ar stomp_connectioninfoitem +can take any value from the list that follows: +.Bl -tag -width Ds +.It Cm conn_name +Readable name for the connection. +.It Cm connection +Id of the Erlang process associated with the internal amqp direct connection. +.It Cm connection_state +Connection state; one of: +.Bl -bullet -compact +.It +running +.It +blocking +.It +blocked +.El +.It Cm session_id +STOMP protocol session identifier +.It Cm channel +AMQP channel associated with the connection +.It Cm version +Negotiated STOMP protocol version for the connection. +.It Cm implicit_connect +Indicates if the connection was established using implicit connect (without CONNECT frame) +.It Cm auth_login +Effective username for the connection. +.It Cm auth_mechanism +STOMP authorization mechanism. +Can be one of: +.Bl -bullet -compact +.It +config +.It +ssl +.It +stomp_headers +.El +.It Cm port +Server port. +.It Cm host +Server hostname obtained via reverse DNS, or its IP address if reverse +DNS failed or was not enabled. +.It Cm peer_port +Peer port. +.It Cm peer_host +Peer hostname obtained via reverse DNS, or its IP address if reverse DNS +failed or was not enabled. +.It Cm protocol +STOMP protocol version, which can be on of the following: +.Bl -bullet -compact +.It +{'STOMP', 0} +.It +{'STOMP', 1} +.It +{'STOMP', 2} +.El +.It Cm channels +Number of channels using the connection. +.It Cm channel_max +Maximum number of channels on this connection. +.It Cm frame_max +Maximum frame size (bytes). +.It Cm client_properties +Informational properties transmitted by the client during connection +.It Cm ssl +Boolean indicating whether the connection is secured with SSL. +.It Cm ssl_protocol +TLS protocol (e.g.\& +.Qq tlsv1 ) . +.It Cm ssl_key_exchange +TLS key exchange algorithm (e.g.\& +.Qq rsa ) . +.It Cm ssl_cipher +TLS cipher algorithm (e.g.\& +.Qq aes_256_cbc ) . +.It Cm ssl_hash +SSL hash function (e.g.\& +.Qq sha ) . +.El +.El +.\" ------------------------------------------------------------------ +.\" ## Management Agent +.\" ------------------------------------------------------------------ +.Ss Management agent plugin +.Bl -tag -width Ds +.It Cm reset_stats_db Op Fl -all +Reset management stats database for the RabbitMQ node. +.Bl -tag -width Ds +.It Fl -all +Reset stats database for all nodes in the cluster. +.El +.El +.\" ------------------------------------------------------------------------------------------------ +.Sh SEE ALSO +.\" ------------------------------------------------------------------------------------------------ +.Xr rabbitmq-diagnostics 8 , +.Xr rabbitmq-plugins 8 , +.Xr rabbitmq-server 8 , +.Xr rabbitmq-queues 8 , +.Xr rabbitmq-upgrade 8 , +.Xr rabbitmq-service 8 , +.Xr rabbitmq-env.conf 5 , +.Xr rabbitmq-echopid 8 +.\" ------------------------------------------------------------------------------------------------ +.Sh AUTHOR +.\" ------------------------------------------------------------------------------------------------ +.An The RabbitMQ Team Aq Mt info@rabbitmq.com diff --git a/deps/rabbit/docs/set_rabbitmq_policy.sh.example b/deps/rabbit/docs/set_rabbitmq_policy.sh.example new file mode 100644 index 0000000000..f46e901ad5 --- /dev/null +++ b/deps/rabbit/docs/set_rabbitmq_policy.sh.example @@ -0,0 +1,4 @@ +# This script is called by rabbitmq-server-ha.ocf during RabbitMQ +# cluster start up. It is a convenient place to set your cluster +# policy here, for example: +# ${OCF_RESKEY_ctl} set_policy ha-all "." '{"ha-mode":"all", "ha-sync-mode":"automatic"}' --apply-to all --priority 0 |