Benny's Shopware Notebook
  • Introduction
    • How to Get in Touch
  • ddev for Shopware
    • Less than 5 Minutes Install with ddev and Symfony Flex
    • Storefront and Admin Watchers with ddev
    • Message Queue Setup with ddev
    • Contribute with ddev
    • Performance Tweaks
    • RabbitMQ with ddev
    • phpstan pro with ddev
    • Fetch Media from Production or Staging Server
  • Hosting
    • Setting up a Cloud Server with ddev
    • How to Trouble-shoot and Evaluate Environment Variables
    • Media URLs Out Of Sync between Servers
    • RabbitMQ
    • Running Shopware CE with PaaS
    • SFTP-Users
    • Basic-Auth for Shopware 6 with nginx
    • How to Avoid Failed Systemd Units
    • JWT-Secrets as Environment Variables
  • Deployment
    • Close-to-Zero Downtime Deployment
    • Docker-Images for Deployment with Gitlab-Runners
    • PHP Cache Related Issues
  • Development
    • Patching the Core
    • How to Discover Available Updates?
    • Local Testing of Shopware Commercial Features
  • Administration
  • Database
  • Migration
    • Side Effects
Powered by GitBook
On this page
  • Setup RabbitMQ with ddev
  • Enable RabbitMQ as Message Transport with Shopware 6
  • Monitor and Control RabbitMQ - Management UI

Was this helpful?

  1. ddev for Shopware

RabbitMQ with ddev

This page explains how to setup the open-source message queuing software RabbitMQ with ddev and Shopware 6.

PreviousPerformance TweaksNextphpstan pro with ddev

Last updated 1 year ago

Was this helpful?

Before using RabbitMQ in a production environment, it may be useful to do a local installation to familiarize yourself with the setup. A local installation also allows for easy debugging in case of runtime problems.

Setup RabbitMQ with ddev

To setup RabbitMQ in your ddev environment, follow the instructions on . Basically, it comes down to executing the command

ddev get b13/ddev-rabbitmq && ddev restart

For our needs, the basic RabbitMQ configuration settings provided with this recipe are sufficient.

Enable RabbitMQ as Message Transport with Shopware 6

To enable RabbitMQ with Shopware 6 we need to enable the php8.2-amqp extension as a prerequisite. For this, add the following line to your .ddev/config.yaml file:

webimage_extra_packages: [ php8.2-amqp ]

Restart ddev with ddev restart to make this effective.

Since its release 6.5, Shopware uses the plain implementation of the Symfony messenger component. Install the Symfony AMQP component, which provides the link between the messenger and RabbitMQ:

ddev exec composer require symfony/amqp-messenger

Finally, to tell Symfony to use RabbitMQ instead of the default Doctrine transport, add these three lines to your .env.dev file:

MESSENGER_TRANSPORT_DSN=amqp://rabbitmq:rabbitmq@rabbitmq:5672/%2f/async
MESSENGER_TRANSPORT_LOW_PRIORITY_DSN=amqp://rabbitmq:rabbitmq@rabbitmq:5672/%2f/low_priority
MESSENGER_TRANSPORT_FAILURE_DSN=amqp://rabbitmq:rabbitmq@rabbitmq:5672/%2f/failed

Shopware 6 will now use RabbitMQ as its message queue transport system.

Monitor and Control RabbitMQ - Management UI

The admin user interface for RabbitMQ can be reached on your local machine at:

https://<your-project>.ddev.site:15673

ddev rabbitmq
ddev rabbitmqadmin
ddev rabbitmqctl

see e.g. ddev rabbitmqadmin --help for more details.

The default credentials are rabbitmq/rabbitmq. Refer to the for further details. The ddev implementation also comes with three easy-to-use commands

https://github.com/b13/ddev-rabbitmq
RabbitMQ documentation