indigophp / queue
Manage work queues with PHP
Requires
- php: >=5.4.0
- jeremeamia/superclosure: ~1.0.0
- psr/log: ~1.0
Requires (Dev)
- codeception/codeception: ~2.0.0
- codeception/mockery-module: dev-master
- iron-io/iron_mq: ~1.5.0
- pda/pheanstalk: ~3.0.0
- videlalvaro/php-amqplib: ~2.4.0
Suggests
- iron-io/iron_mq: Client binding for IronMQ (hosted message queue)
- pda/pheanstalk: PHP client for beanstalkd queue
- videlalvaro/php-amqplib: This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.
This package is not auto-updated.
Last update: 2022-02-01 12:29:22 UTC
README
Indigo Queue manages your queues and processes the jobs you put onto them.
Install
Via Composer
{ "require": { "indigophp/queue": "@stable" } }
Usage
First of all you have decide which MQ do you want to use. Currently supported MQs:
There is also a special implementation, where to job is not sent to a queue, but executed immediately.
Connector
Connector does the communication between the server and the Queue/Worker class.
Queue
You use the Queue class to push jobs to a queue. You can also push a job with a delay.
See Queue example.
Worker
You usually set up a console application for your workers.
See Worker example.
Job
See examples;
Special connector: DirectConnector
This connector does what you think: Executes the pushed job immediately. You can also push a delayed job, BUT BE CAREFUL: this means that your application will sleep for a certain time, so use it wisely.
Testing
$ codecept run
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.