symfony/doctrine-messenger
Doctrine integration for Symfony Messenger. Store, dispatch, and consume messages using Doctrine-backed transports and tooling. Part of the Symfony ecosystem; issues and contributions go through the main Symfony repository.
Illuminate\Queue (database/Redis drivers) or third-party Laravel-compatible packages (e.g., spatie/laravel-queue-scheduler). This package is a blocker for Laravel projects.Adopt this package if:
Avoid this package if:
Illuminate\Queue or Laravel-compatible packages instead).doctrine:// transport was deprecated in Symfony 6.4 for newer transports like doctrine://async).Alternatives to Evaluate:
spatie/laravel-queue-scheduler, laravel-horizon, or native database/redis drivers.amqp:// or redis:// transports if external brokers are allowed.symfony/messenger with a custom transport (e.g., Elasticsearch, MongoDB).For Executives: *"This package lets us replace unreliable external message brokers (like RabbitMQ) with a database-native solution, reducing infrastructure costs and improving compliance. By leveraging Symfony’s Messenger component—already used in [X project]—we can:
For Engineering Leaders: *"Symfony Doctrine Messenger Bridge provides a production-ready database transport for Symfony Messenger, ideal for:
For Developers: *"This package lets us:
doctrine:// transport (deprecated in Symfony 6.4) with a modern, supported solution.Message::where('status', 'failed')->get()).RetryMiddleware, HandleMessageMiddleware) out of the box.
Setup:composer require symfony/doctrine-messenger
php bin/console messenger:setup-db
Example Use Case:
// Dispatch a message
$bus->dispatch(new SendEmailMessage($user->email, $template));
// Consume messages
php bin/console messenger:consume async --limit=10
Pro Tip: Use queue_name in the DSN to route messages to logical queues (e.g., doctrine://default?queue_name=notifications)."*
How can I help you explore Laravel packages today?