Found the problem: it’s related with my RabbitMQ queue settings:
When the action is executed , throws an error vhost mautic/messages not found
when trying to send any e-mail using queue:
Looks like this PR is settings a /messages at the end of of MAUTIC_MESSENGER_DSN_EMAIL and MAUTIC_MESSENGER_DSN_HIT variables, that causes the problem.
These settings works:
mautic:mautic5
← mautic:change-default-rabbitmq-vhost
opened 10:07PM - 17 Feb 24 UTC
the default RabbitMQ vhost is named `/`, which is encoded to `%2F`
See https:… //www.cloudamqp.com/blog/what-is-a-rabbitmq-vhost.html#:~:text=When%20configuring%20RabbitMQ%2C%20at%20least,to%20create%20a%20new%20vhost. and https://symfony.com/doc/current/messenger.html#amqp-transport
There is a bug in Mautic 5 (still figuring out what's going on), that prevents storing the `%2F` value when saving the settings via the UI.
This PR provides a workaround, by renaming the default RabbitMQ vhost from `/` to `mautic`
To test this PR:
* go to the `rabbitmq-worker` example dir
```
❯ cd examples/rabbitmq-worker
```
* start the example
```
❯ docker compose up -d
```
* install Mautic via the UI or CLI
**UI**
go to http://localhost:8003
**CLI**
```
docker compose exec -u www-data -w /var/www/html mautic_web php ./bin/console mautic:install http://localhost:8003 -f --admin_email=admin@example.com --admin_password=mautic
* verify the output of the worker container and check if the queue processing started
```
❯ docker compose logs mautic_worker --no-log-prefix -n100 | grep "[OK] Consuming messages from"
...
[OK] Consuming messages from transport "failed".
[OK] Consuming messages from transport "email".
[OK] Consuming messages from transport "hit".
[OK] Consuming messages from transport "hit".
[OK] Consuming messages from transport "failed".
[OK] Consuming messages from transport "email".
...
```
1 Like