RabbitMQ Plugins Overview

RabbitMQ's core functionality covers AMQP messaging, queues, exchanges, and basic routing. Plugins extend this functionality significantly — adding protocols, tools, monitoring integrations, and routing algorithms. Most RabbitMQ installations rely on at least a few plugins for real-world use.

How Plugins Work

Plugins are Erlang applications that run inside the RabbitMQ broker process. Enabling a plugin loads its code into the running broker. Disabling a plugin unloads it. Most plugins take effect immediately without a broker restart (RabbitMQ 3.8+).

All bundled plugins ship with RabbitMQ — you do not need to download them separately. Third-party plugins are installed manually by dropping their .ez files into the plugins directory.

Listing Plugins

rabbitmq-plugins list

Sample output:

Listing plugins with pattern ".*"...
 Configured: E = explicitly enabled; e = enabled as dependency
 | Status: * = running on rabbit@server
 |/
[E*] rabbitmq_management               3.12.1
[e*] rabbitmq_management_agent         3.12.1
[  ] rabbitmq_shovel                   3.12.1
[  ] rabbitmq_federation               3.12.1
[  ] rabbitmq_stomp                    3.12.1
[  ] rabbitmq_mqtt                     3.12.1
[  ] rabbitmq_prometheus               3.12.1
[  ] rabbitmq_consistent_hash_exchange 3.12.1

Enabling and Disabling Plugins

# Enable one plugin
rabbitmq-plugins enable rabbitmq_shovel

# Enable multiple plugins at once
rabbitmq-plugins enable rabbitmq_shovel rabbitmq_federation

# Disable a plugin
rabbitmq-plugins disable rabbitmq_shovel

# Enable without restarting (if supported by the plugin)
rabbitmq-plugins --online enable rabbitmq_management

Essential Plugins for Every Deployment

rabbitmq_management

The web-based Management UI and HTTP API. Absolutely essential for any production deployment. Enables the dashboard at port 15672.

rabbitmq_prometheus

Exposes all RabbitMQ metrics in Prometheus format at port 15692. Use with Grafana for production monitoring dashboards.

rabbitmq-plugins enable rabbitmq_prometheus

Protocol Extension Plugins

rabbitmq_stomp

Adds support for the STOMP protocol (Simple Text Orientated Messaging Protocol). STOMP is a text-based protocol that allows clients in many languages (Ruby, Python, JavaScript) to connect to RabbitMQ without an AMQP library.

rabbitmq-plugins enable rabbitmq_stomp
# STOMP listens on port 61613

rabbitmq_mqtt

Adds MQTT support. MQTT is the lightweight protocol used by IoT devices — smart sensors, connected appliances, GPS trackers. Enabling this plugin lets IoT devices publish and subscribe to RabbitMQ directly.

rabbitmq-plugins enable rabbitmq_mqtt
# MQTT listens on port 1883 (unencrypted) and 8883 (TLS)

rabbitmq_web_stomp

Adds WebSocket support for STOMP. Allows browser-based JavaScript clients to connect directly to RabbitMQ and receive real-time messages using WebSockets.

rabbitmq_web_mqtt

Adds WebSocket support for MQTT. Enables IoT-style browser applications to connect via WebSocket/MQTT.

Routing Plugins

rabbitmq_consistent_hash_exchange

Adds a consistent hash exchange type that distributes messages evenly across multiple queues based on a hash of the routing key. Useful for sharding workloads across parallel consumer groups.

rabbitmq_random_exchange

Adds a random exchange type that routes each message to one randomly selected queue from all bound queues. Simpler than consistent hash for random load spreading.

Data Movement Plugins

rabbitmq_shovel

Continuously copies messages from a queue on one broker to an exchange on another broker. Used for cross-datacenter message replication and bridging separate RabbitMQ installations.

rabbitmq_federation

Creates a federated link between exchanges or queues on different brokers. Unlike Shovel, federation supports bi-directional and multi-hop message flows. Used for geographically distributed deployments.

Authentication Plugins

rabbitmq_auth_backend_ldap

Enables authentication against an LDAP or Active Directory server. Users from your corporate directory can log into RabbitMQ without creating separate accounts.

rabbitmq_auth_backend_http

Delegates authentication and authorisation decisions to an external HTTP endpoint. Useful for integrating RabbitMQ into a custom identity system.

Plugin Directory

Linux:    /usr/lib/rabbitmq/lib/rabbitmq_server-x.x.x/plugins/
macOS:    /opt/homebrew/Cellar/rabbitmq/x.x.x/plugins/
Windows:  C:\Program Files\RabbitMQ Server\rabbitmq_server-x.x.x\plugins\

Third-party plugin .ez files are copied to this directory, then enabled with rabbitmq-plugins enable.

Plugin Configuration

Some plugins require additional configuration in rabbitmq.conf or advanced.config. For example, the MQTT plugin configuration:

mqtt.listeners.tcp.default = 1883
mqtt.allow_anonymous = false
mqtt.vhost = /
mqtt.exchange = amq.topic

Summary

RabbitMQ plugins extend the broker's capabilities without modifying the core. Essential plugins include rabbitmq_management for the UI and rabbitmq_prometheus for monitoring. Protocol plugins (rabbitmq_mqtt, rabbitmq_stomp) connect IoT devices and browser clients. Routing plugins (rabbitmq_consistent_hash_exchange) enable advanced load distribution. Data movement plugins (rabbitmq_shovel, rabbitmq_federation) link separate brokers. Enable plugins with rabbitmq-plugins enable and list them with rabbitmq-plugins list.

Leave a Comment

Your email address will not be published. Required fields are marked *