Mautic 5.1 with Queueing Rabbitmq Setup

Your software
My Mautic version is:5.1.0
My PHP version is: php 8.1
My Database type and version is: mysql latest

Your problem

The test message could not be sent due to the following error: ‘Could not connect to the AMQP server. Please verify the provided DSN.’.


I installed Mautic 5.1.0 successfully without any issues. I need a queuing system and wish to integrate it with RabbitMQ, but I am encountering errors. Below is the Docker configuration file I used and the error message from my configuration screen. Additionally, please confirm the RabbitMQ port settings.

My problem is:
These errors are showing in the log: The test message could not be sent due to the following error: ‘Could not connect to the AMQP server. Please verify the provided DSN.’.

Steps I have tried to fix the problem: amqp://guest:SECRET@localhost:5672

version: '3.8'

services:
  mautic:
    image: mautic/mautic:5.1.0
    container_name: mautic
    ports:
      - "80:80"
    environment:
      MAUTIC_DB_HOST: mysql
      MAUTIC_DB_NAME: mautic
      MAUTIC_DB_USER: mautic_user
      MAUTIC_DB_PASSWORD: mautic_password
      MAUTIC_RABBITMQ_HOST: rabbitmq
      MAUTIC_RABBITMQ_PORT: 5672
      MAUTIC_RABBITMQ_USER: guest
      MAUTIC_RABBITMQ_PASSWORD: guest
    depends_on:
      - mysql
      - rabbitmq
    volumes:
      - mautic_data:/var/www/html
    networks:
      - mautic_net

  mysql:
    image: mysql:8
    container_name: mysql
    environment:
      MYSQL_ROOT_PASSWORD: root_password
      MYSQL_DATABASE: mautic
      MYSQL_USER: mautic_user
      MYSQL_PASSWORD: mautic_password
    volumes:
      - mysql_data:/var/lib/mysql
    networks:
      - mautic_net

  rabbitmq:
    image: rabbitmq:3-management
    container_name: rabbitmq
    ports:
      - "5672:5672"
      - "15672:15672"
    environment:
      RABBITMQ_DEFAULT_USER: guest
      RABBITMQ_DEFAULT_PASS: guest
    networks:
      - mautic_net

volumes:
  mautic_data:
  mysql_data:

networks:
  mautic_net: