jgauthi / poc_symfony6_messenger

POC Symfony 6.4 with Messenger component + Docker (LAMP with Supervisor, MailDev, RabbitMQ)
http://localhost:8000
0 stars 0 forks source link
docker-compose maildev mysql8-2 rabbitmq supervisor symfony-messenger symfony6-4

POC Symfony 6.4 with Messenger component + Docker (LAMP with Supervisor, MailDev, RabbitMQ)

Messenger provides a message bus with the ability to send messages and then handle them immediately in your application or send them through transports (e.g. queues) to be handled later. To learn more deeply about it, read the Messenger component docs.

The messages are automatically consumed (send) by a worker from supervisor. Without it, you need to launch manually the command make messenger (or php bin/console messenger:consume async in local symfony server).

Prerequisites

More information on symfony website.

Installation

Command lines:

make install db-install

# (optional) Copy and edit configuration values ".env.local"

Usage

Use docker for execute the built-in web server and access the application in your browser at http://localhost:8000:

make up

# Launch Messages service (optional: only needed if supervisor is not launch)
# make messenger

# For stop services
make stop

Debug commands:

make messenger CMD="-vv"

# Retry failed messages several times (3 attempts)
make sf-cmd CMD="messenger:failed:show"
make sf-cmd CMD="messenger:failed:retry"

Enjoy!