Queue Client is a PHP library that provides a queue abstraction layer (SQS, File, Memory ...).
Queue Client can be used to manage a lot of various queue systems. For example, you could have AWS SQS in production environment, but in-memory queues on the development environment.
Development version:
php composer.phar require reputation-vip/queue-client:*@dev
Stable version:
php composer.phar require reputation-vip/queue-client:0.1.*
For example, let's set up the Queue Client with a file adapter. To setup other adapters, take a look at the Adapter section.
<?php
use ReputationVIP\QueueClient\QueueClient;
use ReputationVIP\QueueClient\Adapter\FileAdapter;
$adapter = new FileAdapter('/tmp');
$queueClient = new QueueClient($adapter);
<?php
// ... setup your queue client
$queueClient->createQueue('testQueue');
$queueClient->addMessage('testQueue', 'testMessage');
$messages = $queueClient->getMessages('testQueue');
$message = $messages[0];
$queueClient->deleteMessage($message);
echo $message['Body'];
Unit tests are provided by Atoum .
To launch unit tests, run the following command:
php vendor/atoum/atoum/bin/atoum -c coverage.php -d tests/units/
OR
make test
(docker and docker-compose are required)
php xdebug extension must be installed for code coverage report to be generated
- PHP 7.1.3 or above.
Bugs and feature requests are tracked on GitHub
- Symfony with its own Queue Client Bundle.
Nicolas Couet - [email protected] - https://twitter.com/tejerka - https://github.com/tejerka
See also the list of contributors who participated to this project.