Overview
This template provides a production‑ready RabbitMQ instance as a Monk runnable. You can:- Run it directly to get a managed RabbitMQ container with sensible defaults
- Inherit it in your own runnable to seamlessly add a message broker to your stack
What this template manages
- RabbitMQ container (
rabbitmqimage, configurable tag with management plugin) - Network services on multiple ports (AMQP, management UI, clustering)
- Persistent volumes for data and configuration
- Configuration files for RabbitMQ, advanced settings, and environment variables
- Optional Nginx reverse proxy for the management UI
Quick start (run directly)
- Load templates
- Run RabbitMQ with defaults
- Run the full stack with Nginx reverse proxy
- AMQP:
localhost:5672(or the runnable hostname inside Monk networks) - Management UI:
localhost:15672(orlocalhost:8080if using the stack with Nginx) - Default credentials:
guest/guest
Configuration
Key variables you can customize in this template:${monk-volume-path}/rabbitmq:/var/lib/rabbitmq/ on the host.
Configuration files
RabbitMQ uses three configuration files that can be customized:- rabbitmq.conf: Primary configuration file (sysctl/ini-like format) at
/etc/rabbitmq/rabbitmq.conf - advanced.config: Erlang-based config for advanced settings at
/etc/rabbitmq/advanced.config - rabbitmq-env.conf: Environment variables at
/etc/rabbitmq/rabbitmq-env.conf
files/ directory of this repository and are mounted into the container.
Use by inheritance (recommended for apps)
Inherit the RabbitMQ runnable in your application and declare a connection. Example:Ports and connectivity
RabbitMQ exposes multiple services:- Service:
rabbitmq-amqp-1on TCP port5672(AMQP protocol) - Service:
rabbitmq-amqp-2on TCP port5671(AMQP with TLS) - Service:
rabbitmq-ui-2on TCP port15672(Management UI) - Service:
rabbitmq-ui-1on TCP port15671(Management UI with TLS) - Service:
rabbitmq-stream-1on TCP port5551(Stream protocol) - Service:
rabbitmq-stream-2on TCP port5552(Stream protocol) - Service:
rabbitmq-erl-epmd-porton TCP port4369(Erlang port mapper) - Service:
rabbitmq-clion TCP port25672(CLI tools)
connection-hostname("\<connection-name>") to resolve the broker host.
Persistence and configuration
- Data path:
${monk-volume-path}/rabbitmq:/var/lib/rabbitmq/ - Config files are mounted from the
files/directory in this repository - Modify the config files before loading the template to customize RabbitMQ behavior
Stack deployment
Therabbitmq/stack process group includes:
- RabbitMQ server (
rabbitmq/rabbitmq) - Nginx reverse proxy (
rabbitmq/nginx) for the management UI on port 8080
Default credentials
The default administrator username and password are:- Username:
guest - Password:
guest
Troubleshooting
- Check that the host volumes are writable by the container user
- Verify that ports 5672 and 15672 are not already in use
- View RabbitMQ logs:
- View Nginx logs (when using stack):
- Access container shell:
Related resources
- RabbitMQ Documentation: https://www.rabbitmq.com/documentation.html
- AMQP Protocol: https://www.amqp.org/
- Management Plugin Guide: https://www.rabbitmq.com/management.html