RabbitMQ is a message-queueing software also known as a message broker or queue manager.
This add-on integrates RabbitMQ into your DDEV project and creates users/queues according to the configuration defined in .ddev/rabbitmq/config.yaml
.
ddev add-on get ddev/ddev-rabbitmq
ddev restart
After installation, make sure to commit the .ddev
directory to version control.
From within the container, the RabbitMQ container is reached at hostname: rabbitmq
on port 5672
, so
the server URL will be amqp://rabbitmq:5672
.
For more details check the connection section below.
The rabbitmq/config.yaml describes vhosts, queues, users and plugins.
The configuration can be applied with the following command:
ddev rabbitmq apply
Note
This may not cover all possible configuration values! But it is a good start.
To ensure the configuration is applied automatically on boot, add the following
hook to your .ddev/config.yaml
:
hooks:
post-start:
- exec-host: ddev solrctl apply
Remove rabbitmq configuration but keep default user (rabbitmq
) and vhost (/
):
ddev rabbitmq wipe
Command | Description |
---|---|
ddev rabbitmq --help |
RabbitMQ custom helper command |
ddev rabbitmqadmin --help |
RabbitMQ Management CLI (no auth required) |
ddev rabbitmqctl --help |
Used to manage the cluster and nodes |
ddev rabbitmq launch |
Launch RabbitMQ Management UI in the browser (credentials rabbitmq:rabbitmq ) |
ddev describe |
View service status and used ports for RabbitMQ |
ddev logs -s rabbitmq |
Check RabbitMQ logs |
âšī¸rabbitmqadmin
and rabbitmqctl
share some functions. Both are needed for full configuration.
RabbitMQ is accessible from the host machine itself as well as between the containers on the same network, and comes with a nice management UI for ease of use.
The management UI can be accessed through https://<DDEV_SITENAME>.ddev.site:15673
(ddev launch :15673
) on the host machine.
Management UI credentials
rabbitmq
rabbitmq
For more information about the HTTP API see the official documentation.
You can access the RabbitMQ service through its AMQP protocol inside any DDEV container via amqp://rabbitmq:5672
To change the Docker image:
ddev dotenv set .ddev/.env.rabbitmq --rabbitmq-docker-image="rabbitmq:4-management-alpine"
ddev add-on get ddev/ddev-rabbitmq
ddev restart
Make sure to commit the .ddev/.env.rabbitmq
file to version control.
Originally Contributed by @Graloth in ddev-contrib
Maintained by @b13