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).
Make
command. On linux, install with sudo apt install build-essential
. On Windows, see here.8000, 8080, 1025, 1080, 15672
(you can change it on docker-compose.override.yml
file after install).More information on symfony website.
Command lines:
make install db-install
# (optional) Copy and edit configuration values ".env.local"
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
COMPOSE_FILE
in .env for add / remove containers from .docker/compose folder.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!