Download the PHP package thomasdcodes/pdo-messenger-transport without Composer
On this page you can find all versions of the php package thomasdcodes/pdo-messenger-transport. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thomasdcodes/pdo-messenger-transport
More information about thomasdcodes/pdo-messenger-transport
Files in thomasdcodes/pdo-messenger-transport
Package pdo-messenger-transport
Short Description Gives the possibility to use the symfony messenger transport with a pdo connected database.
License MIT
Informations about the package pdo-messenger-transport
PdoMessengerTransport
General
This Symfony bundle provides a PDO-based transport for the Symfony Messenger component. It serves as a lightweight alternative to the official Doctrine transport, specifically designed for projects that do not use Doctrine ORM or DBAL but still require a reliable database-backed message queue.
Installation
1. Register the bundle
Add the bundle to your config/bundles.php:
2. Prepare the database
Execute the following Query to create the database table:
Configuration
1. Register the PDO Service
The bundle requires a \PDO instance to be registered in your service container. You can define a new PDO service or use an existing one (e.g., from Doctrine):
2. Global Bundle Configuration (Mandatory if you don't use autowiring for PDO)
Create config/packages/tdc_pdo_messenger_transport.yaml:
If you don't provide a pdo_service, the bundle will try to autowire a \PDO instance.
3. Configure Symfony Messenger
In your messenger configuration, use the pdoqueue:// DSN.
Usage
Run the messenger worker as usual:
All versions of pdo-messenger-transport with dependencies
ext-pdo Version *
symfony/framework-bundle Version ^7.0
symfony/messenger Version ^7.0