Skip to content

ddev/ddev-rabbitmq

Repository files navigation

add-on registry tests last commit release

DDEV RabbitMQ

Overview

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.

Installation

ddev add-on get ddev/ddev-rabbitmq
ddev restart

After installation, make sure to commit the .ddev directory to version control.

Configuration

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.

YAML configuration

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

Usage

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.

Connection

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.

Management UI

The management UI can be accessed through https://<DDEV_SITENAME>.ddev.site:15673 (ddev launch :15673) on the host machine.

Management UI credentials

  • Username: rabbitmq
  • Password: rabbitmq

For more information about the HTTP API see the official documentation.

AMQP protocol access

You can access the RabbitMQ service through its AMQP protocol inside any DDEV container via amqp://rabbitmq:5672

Advanced Customization

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.

Examples

Credits

Originally Contributed by @Graloth in ddev-contrib

Maintained by @b13

About

RabbitMQ message broker, queue manager for DDEV

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors 5

Languages