# Mautic 5.1 with Queueing Rabbitmq Setup

**URL:** https://forum.mautic.org/t/mautic-5-1-with-queueing-rabbitmq-setup/32828
**Category:** Mautic 5 Install/Upgrade Support
**Tags:** community, discussion
**Created:** [July 20, 2024, 10:16am UTC](https://forum.mautic.org/t/mautic-5-1-with-queueing-rabbitmq-setup/32828 "2024-07-20T10:16:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![gsure21](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gsure21/32/12358_2.png) [@gsure21](https://forum.mautic.org/u/gsure21)
#### Post date: [July 20, 2024, 10:16am UTC](https://forum.mautic.org/t/mautic-5-1-with-queueing-rabbitmq-setup/32828/1 "2024-07-20T10:16:52Z")

</div>

**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

```auto
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:

```

---

<div class="post-metadata">

### Author: ![alexhammer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alexhammer/32/14525_2.png) [@alexhammer](https://forum.mautic.org/u/alexhammer)
#### Post date: [February 16, 2025, 2:04pm UTC](https://forum.mautic.org/t/mautic-5-1-with-queueing-rabbitmq-setup/32828/2 "2025-02-16T14:04:52Z")

</div>

late but anyway:  
If you want to declare it already in your docker-compose.yml you need to use another variable:

```auto
- MAUTIC_MESSENGER_DSN_EMAIL: amqp://guest:guest@rabbitmq:5672/mautic/messages

```

```auto
- MAUTIC_MESSENGER_DSN_HITS: amqp://guest:guest@rabbitmq:5672/mautic/hits

```
