Introduction
Hello folks. Welcome back to another article.
In this post, I will share with you steps to enable a RabbitMQ Plugin using RabbitMQ CLI tools.
Here are some prerequisites required to have before you continue:
- You must already have RabbitMQ installed.
- RabbitMQ CLI tools are working.
Without further ado, let’s start.
Step by Step Guide
Here is the concise version of How to Enable RabbitMQ Plugin:
- Run command
rabbitmq-plugins list
to list all the available plugins. - Find the name of the desired plugin from the list.
- Enable the plugin using the command
rabbitmq-plugins enable plugin_name
. - If a plugin is not found from the list or if it is a custom plugin, download the plugin and copy the plugin file into the rabbitmq plugins folder. Follow step 1 to step 3 again. ( I might do another short post for custom plugin next time )
- Lastly, verified the plugin is function as expected.
Step 1: List all available rabbitmq plugins
Run rabbitmq-plugins list
to display all the available plugins. You shall see the screen like the one below.
Step 2 & 3: Find the desired plugin & Enable the plugin
In this post, we will enable rabbitmq_shovel
and rabbitmq_shovel_management
as an example. Let's try to enable both plugins using the command rabbitmq-plugins enable
.
RabbitMQ CLI tools allow you to enable multiple plugins in a single command:
The above logs showed us we have successfully enabled two plugins. Let’s verify it in the next section.
Step 5: Lastly, Verification !!
Due to this example, we’re using rabbitmq_shovel
and rabbitmq_shovel_management
as an example. We can easily verify this in our RabbitMQ management dashboard.
- Go to localhost:15672. Default username and password is
guest
. - Go to Admin tab and you shall see the below screenshot.
By default, options in the red box are not there. It was displayed after we enabled the shovel plugins.
Conclusion
In short, it was extremely easy & convenient to add & enable RabbitMQ plugins using the CLI tools. Here are summarized commands that you need:
# List plugins
rabbitmq-plugins list# Enable plugin
rabbitmq-plugins enable plugin_1 plugin_2 # You can enable multiple plugins in a command# Disable Plugin
rabbitmq-plugins disable plugin_1
I hope you enjoy this article and I will see you in the next article.
Originally published on my blog
References
- RabbitMQ Official Plugins Guide