Transport - provides methods for management messages in queue.
Currently only supported Doctrine DBAL.
The transport uses Doctrine DBAL library and SQL like server as a broker. It creates a table there. Pushes and pops messages to\from that table.
Create connection:
You can get a DBAL Connection through the Doctrine\DBAL\DriverManager class.
$connection = \Doctrine\DBAL\DriverManager::getConnection([
'dbname' => 'my_db',
'user' => 'root',
'password' => '*******',
'host' => 'localhost',
'port' => '5432',
'driver' => 'pdo_pgsql',
]);
or
$connection = \Doctrine\DBAL\DriverManager::getConnection([
'driver' => 'pdo_sqlite',
'path' => '/db/queue.db'
]);
Create transport:
$transport = new \Simple\Queue\Transport\DoctrineDbalTransport($connection);