Using RabbitMQ: rabbitmq-plugins
rabbitmq-plugins
rabbitmq-plugins is the command-line tool for managing RabbitMQ broker plugins.
Syntax#
rabbitmq-plugins [-n node] {command} [command options ...]Description#
rabbitmq-plugins is used to enable, disable, and browse plugins. These operations must be performed by a user who has write permissions to the RabbitMQ configuration directory.
Some plugins depend on other plugins to work correctly. rabbitmq-plugins walks these dependency relationships and enables all required plugins. Plugins that you specify explicitly on the rabbitmq-plugins command line are marked as explicitly enabled; dependency plugins are marked as implicitly enabled. Implicitly enabled plugins will be automatically disabled when they are no longer needed.
The enable, disable, and set commands update the plugins file and then attempt to connect to the broker to ensure it is running all enabled plugins. By default, if the tool cannot connect to a running broker (for example, if it has been stopped), a warning is displayed. Use —online or —offline to change this behavior.
Commands#
list [-v] [-m] [-E] [-e] [pattern]-v Show detailed information for all plugins (verbose)-m Show only plugin names (minimal)-E Show only explicitly enabled plugins-e Show explicitly and implicitly enabled pluginspattern is a pattern used to filter plugin names.
This command shows all plugins, their versions, dependencies, and descriptions. Each plugin line is prefixed by two status indicators enclosed in []. The first indicator is "" (empty) if the plugin is not enabled; “E” if the plugin is explicitly enabled; “e” if the plugin is implicitly enabled; or ”!” if the plugin is enabled but missing, and therefore cannot run.
The second indicator is "" (empty) if the plugin is not running; "*" if it is running. If an optional pattern is provided, only plugins whose names match the pattern are displayed.
rabbitmq-plugins list# List all plugins, one per line
rabbitmq-plugins list -v# List all plugins, including version and description
rabbitmq-plugins list -v management# List all plugins whose names contain "management"
rabbitmq-plugins list -e rabbit# List all explicitly or implicitly enabled pluginsrabbitmq-plugins enable [--offline] [--online] {plugin ...}# --offline Only modify the enabled-plugins file# --online Treat failure to connect to a running broker as a fatal error# plugin One or more plugins to be enabled# This command enables the specified plugins and all of their dependenciesrabbitmq-plugins disable [--offline] [--online] {plugin ...}# --offline Only modify the enabled-plugins file# --online Treat failure to connect to a running broker as a fatal error# plugin One or more plugins to be disabled# This command disables the specified plugins and all plugins that depend on themrabbitmq-plugin set [--offline] [--online] {plugin ...}# --offline Only modify the enabled-plugins file# --online Treat failure to connect to a running broker as a fatal error# plugin Zero or more plugins to be enabled# This command enables the specified plugins and their dependencies. Unlike rabbitmq-plugins enable, it ignores and overrides any already enabled plugins.# Calling rabbitmq-plugins set with no plugin arguments is valid and means "disable all plugins".# rabbitmq-plugins set rabbitmq_management# The command above enables the management plugin and disables all other plugins.Usage#
Run rabbitmq-plugins enable rabbitmq_management to enable the rabbitmq_management plugin so you can check the cluster status via the web UI. Note the following points:
If you access RabbitMQ via localhost:15672, you can log in with the guest account to view server information. However, by default the guest account has full permissions and is also the default account. For security reasons, the guest user is only allowed to log in from localhost. It is best to change the guest account password and create a new account to manage and monitor the RabbitMQ server.