# Mautic 5.2.8 - messenger:consume email does not process messages from doctrine queue despite correct configuration

**URL:** <https://forum.mautic.org/t/mautic-5-2-8-messenger-consume-email-does-not-process-messages-from-doctrine-queue-despite-correct-configuration/37231>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [January 29, 2026, 3:43am UTC](https://forum.mautic.org/t/mautic-5-2-8-messenger-consume-email-does-not-process-messages-from-doctrine-queue-despite-correct-configuration/37231 "2026-01-29T03:43:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chapa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/chapa/32/13310_2.png) [@chapa](https://forum.mautic.org/u/chapa)\
**Post date:** [January 29, 2026, 3:43am UTC](https://forum.mautic.org/t/mautic-5-2-8-messenger-consume-email-does-not-process-messages-from-doctrine-queue-despite-correct-configuration/37231/1 "2026-01-29T03:43:09Z")

</div>

**Your software**  
My Mautic version is: 5.2.8  
My PHP version is: 8.3  
My Database type and version is: MySQL/MariaDB  
OS: Ubuntu 24 (dedicated server, no Docker)

**Problem Description:**

I have configured Mautic to use Doctrine as the queue transport for emails, but the `messenger:consume email` command does not process any messages from the queue, even though there are 9,884 messages waiting in the `messenger_messages` table.

**Current Configuration:**

1. **config/local.php** contains:

```php
'messenger_dsn_email' => 'doctrine://default?queue_name=default',
'messenger_dsn_hit' => 'doctrine://default?queue_name=default',
'messenger_dsn_failed' => 'doctrine://default?queue_name=failed',

```

1. **Queue Settings in UI** (Settings → Configuration → Queue Settings):

2. **.env file** contains:

```auto
MAUTIC_MESSENGER_DSN_EMAIL=doctrine://default%3Fqueue_name=default
MAUTIC_MESSENGER_DSN_HIT=doctrine://default%3Fqueue_name=default
MAUTIC_MESSENGER_DSN_FAILED=doctrine://default%3Fqueue_name=failed

```

1. **Environment variables are loading correctly:**

```bash
$ sudo -u www-data php8.3 -r "
require '/var/www/mautic/vendor/autoload.php';
\$dotenv = new Symfony\Component\Dotenv\Dotenv();
\$dotenv->loadEnv('/var/www/mautic/.env');
echo 'From .env: ' . (\$_ENV['MAUTIC_MESSENGER_DSN_EMAIL'] ?? 'NOT DEFINED') . PHP_EOL;
echo 'getenv: ' . (getenv('MAUTIC_MESSENGER_DSN_EMAIL') ?: 'EMPTY') . PHP_EOL;
"
# Output:
From .env: doctrine://default?queue_name=default
getenv: doctrine://default?queue_name=default

```

1. **Messages exist in database:**

```sql
SELECT queue_name, COUNT(*) as total FROM messenger_messages GROUP BY queue_name;
-- Result: queue_name=default, total=9884

```

1. **Messages are available (not locked):**

```sql
SELECT COUNT(*) FROM messenger_messages WHERE available_at <= NOW();
-- Result: 9884 (all available)

```

**Steps Taken:**

1. Changed `messenger_dsn_email` from `sync://` to `doctrine://default?queue_name=default` in local.php

2. Configured Queue Settings via Mautic UI

3. Added environment variables to `.env` file

4. Cleared cache completely: `rm -rf /var/www/mautic/var/cache/*`

5. Rebuilt cache: `sudo -u www-data php8.3 bin/console cache:warmup --env=prod`

6. Restarted PHP-FPM: `systemctl restart php8.3-fpm`

**Test Performed:**

```bash
$ sudo -u www-data php8.3 /var/www/mautic/bin/console messenger:consume email --limit=3 -vvv --env=prod

 [OK] Consuming messages from transport "email".

 // The worker will automatically exit once it has processed 3 messages, been
 // running for 60s or received a stop signal via the messenger:stop-workers
 // command.

 // Quit the worker with CONTROL-C.

$

```

**Result:** The command starts, shows “Consuming messages from transport email”, waits for 60 seconds, and exits without processing any messages. No errors are shown, but no messages are consumed either.

**Debug Config Output:**

```bash
$ sudo -u www-data php8.3 bin/console debug:config framework messenger --env=prod | grep -A10 "email:"

    email:
        dsn: '%env(urlencoded-dsn:MAUTIC_MESSENGER_DSN_EMAIL)%'
        retry_strategy:
            service: Mautic\MessengerBundle\Retry\RetryStrategy
            max_retries: 3
            delay: 1000
            multiplier: 2
            max_delay: 0
        serializer: null
        options: { }
        failure_transport: null

```

**Previous Error (before configuration changes):**  
When the DSN was set to `sync://`, I received this error:

```auto
You cannot receive messages from the Messenger SyncTransport.

```

This error no longer appears, but the worker still doesn’t process any messages.

**Question:**

Why is `messenger:consume email` not processing messages from the `messenger_messages` table even though:

- The DSN is correctly configured as `doctrine://default?queue_name=default`
- There are 9,884 messages in the table with `queue_name='default'`
- All messages have `available_at <= NOW()`
- The “Send test message” button in Queue Settings returns “Success!”
- No errors are displayed when running the command

Is there an additional configuration step required for Mautic 5.2.8 to connect the `email` transport to the `default` queue in the `messenger_messages` table?

I need help please

thanks!!!

* * *

**You can post this at:** [https://forum.mautic.org/c/support/8](https://forum.mautic.org/c/support/8)

Would you like us to try one last thing before sending this to support? These errors are showing in the log:

Steps I have tried to fix the problem:

---

<div class="post-metadata">

**Author:** ![rcarabelli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rcarabelli/32/6807_2.png) [@rcarabelli](https://forum.mautic.org/u/rcarabelli)\
**Post date:** [January 31, 2026, 1:09am UTC](https://forum.mautic.org/t/mautic-5-2-8-messenger-consume-email-does-not-process-messages-from-doctrine-queue-despite-correct-configuration/37231/2 "2026-01-31T01:09:22Z")

</div>

Can you please share the logs after running the consume mail command in the terminal please?

---

<div class="post-metadata">

**Author:** ![chapa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/chapa/32/13310_2.png) [@chapa](https://forum.mautic.org/u/chapa)\
**Post date:** [February 1, 2026, 3:25am UTC](https://forum.mautic.org/t/mautic-5-2-8-messenger-consume-email-does-not-process-messages-from-doctrine-queue-despite-correct-configuration/37231/3 "2026-02-01T03:25:29Z")

</div>

Hello, exactly what should I send you? What I sent you contains the full error trace.

🔥 root@srv953714 ~ # rm -rf /var/www/mautic/var/cache/\*  
sudo -u www-data php8.3 /var/www/mautic/bin/console cache:warmup --env=prod  
sudo -u www-data php8.3 /var/www/mautic/bin/console messenger:consume email --limit=3 -vvv --env=prod

// Warming up the cache for the prod environment with debug  
// false

It’s not processing messages. Please verify that the change was applied correctly:

bash

```auto
sudo -u www-data php8.3 /var/www/mautic/bin/console debug:config framework messenger --env=prod | grep -A5 "email:"

```

Also check which DSN is actually being used:

bash

```auto
sudo -u www-data php8.3 -r "
require '/var/www/mautic/vendor/autoload.php';
$dotenv = new Symfony\Component\Dotenv\Dotenv();
$dotenv->loadEnv('/var/www/mautic/.env');
echo 'DSN EMAIL: ' . ($_ENV['MAUTIC_MESSENGER_DSN_EMAIL'] ?? 'NOT DEFINED') . PHP_EOL;
"

```

Also check if `local.php` is not overriding the value:

bash

```auto
grep -i "messenger_dsn" /var/www/mautic/config/local.php

```

🔥 root@srv953714 ~ sudo -u www-data php8.3 /var/www/mautic/bin/console debug:config framework messenger --env=prod | grep -A5 “email:”

```
email:
    dsn: '%env(urlencoded-dsn:MAUTIC_MESSENGER_DSN_EMAIL)%'
    retry_strategy:
        service: Mautic\MessengerBundle\Retry\RetryStrategy
        max_retries: 3
        delay: 1000

```

🔥 root@srv953714 ~ # sudo -u www-data php8.3 -r "

require ‘/var/www/mautic/vendor/autoload.php’;

$dotenv = new Symfony\Component\Dotenv\Dotenv();

$dotenv-\>loadEnv(‘/var/www/mautic/.env’);  
echo 'DSN EMAIL: ’ . ($ENV[‘MAUTIC\_MESSENGER\_DSN\_EMAIL’] ?? ‘NOT DEFINED’) . PHP\_EOL;

"

DSN EMAIL: doctrine://default?queue\_name=default

🔥 root@srv953714 ~ # grep -i “messenger\_dsn” /var/www/mautic/config/local.php

‘messenger\_dsn\_email’ =\> ‘doctrine://default?queue\_name=email’,  
‘messenger\_dsn\_hit’ =\> ‘doctrine://default?queue\_name=hit’,  
‘messenger\_dsn\_failed’ =\> ‘doctrine://default?queue\_name=failed’,

🔥 root@srv953714 ~ #

Best regards
