equip / queue
The better queueing library
Installs: 67 127
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 4
Forks: 1
Open Issues: 2
Requires
- php: >=5.6
- league/event: ^2.1
- league/tactician: ^1.0
- psr/log: ^1.0
Requires (Dev)
- eloquent/liberator: ^2.0
- eloquent/phony: 0.13.4
- monolog/monolog: ^1.21
- pda/pheanstalk: ^3.1
- phpunit/phpunit: ^5.4
Suggests
- monolog/monolog: For a simple logging implementation of PSR-3
README
Details
Available Drivers
- Redis
Missing the driver you want? Create it!
Creating A Consumer
// Instantiate Redis $redis = new Redis; $redis->connect('127.0.0.1'); // Instantiate the Redis driver $driver = new Equip\Queue\Driver\RedisDriver($redis); // Instantiate the event class (which uses league/event) $emitter = new League\Event\Emitter; $event = new Equip\Queue\Event($emitter); // Instantiate the command factory $injector = new Auryn\Injector; $factory = new Equip\Queue\Command\AurynCommandFactory($injector); // Instantiate the Worker class $worker = new Equip\Queue\Worker($driver, $event, $factory); // Kick off the consumer $worker->consume($queue);
Here's an example consumer
Creating A Producer
// Instantiate Redis $redis = new Redis; $redis->connect('127.0.0.1'); // Instantiate the Redis driver $driver = new Equip\Queue\Driver\RedisDriver($redis); // Instantiate the Queue class $queue = new Queue($driver);
Here's an example producer
Adding A Message To The Queue
$result = $queue->add($queue, Command::class, new Options);
A boolean ($result
) is returned which contains the status of the push onto the queue.
Creating A Driver
Creating a driver is as simple as implementing the DriverInterface.