1001Ferramentas
🐰Dev

docker-compose RabbitMQ Generator

Generate a ready-to-use docker-compose for RabbitMQ with the management UI enabled, user, password and ports. Spin up your local message broker instantly.

YAML

RabbitMQ with the management dashboard enabled

RabbitMQ is one of those pieces where the version with the management dashboard is worth far more than the plain one during development: you can see queues, publish a test message, inspect what got stuck and wipe everything with a click. The image with the dashboard ships ready, and the difference is one tag in the name.

Enter a user and password and the page assembles the service, exposing both ports: the protocol one, where the application connects, and the dashboard one, which opens in a browser. The credentials go in as environment variables and replace the default pair — which is public and well known, and should therefore never survive into anything reachable over a network.

Worth knowing that without a declared volume everything is lost when the container is recreated: queues, exchanges, persisted messages and users created through the dashboard. In development that is often desirable, since it guarantees a clean slate. When it is not, RabbitMQ's data directory needs mounting as a volume — and remember that the node name forms part of the data identity, so changing the container name can leave RabbitMQ unable to recognise the old volume.

Frequently asked questions

Which port is the dashboard on?
The management one, separate from the protocol port applications connect to. Opening the protocol port in a browser shows nothing — it is a binary protocol, not HTTP, and confusing the two ports is the first stumble for newcomers.
Do messages survive a restart?
Only with a declared volume and with queues and messages marked durable — those are independent conditions. A durable queue holding non-persistent messages loses the messages; a persistent message in a non-durable queue loses the whole queue. With no volume, nothing survives recreating the container.
Can queues be created at startup?
They can, through a definitions file loaded at boot describing users, permissions, exchanges, queues and bindings. That is the route to a reproducible development environment, better than creating everything through the dashboard and depending on the volume surviving.

Related Tools