Download the PHP package roadrunner/jobs without Composer
On this page you can find all versions of the php package roadrunner/jobs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download roadrunner/jobs
More information about roadrunner/jobs
Files in roadrunner/jobs
Package jobs
Short Description PHP API for the RoadRunner Jobs (queues) plugin: manage pipelines, push tasks and consume them in workers
License MIT
Homepage https://roadrunner.dev/
Informations about the package jobs
PHP client for RoadRunner Jobs (Queues) plugin
This package lets PHP applications work with the RoadRunner Jobs plugin: create and manage pipelines, push tasks to queues and consume them in RoadRunner workers.
Get Started
Installation
You can use the convenient installer to download the latest available compatible version of RoadRunner assembly:
Configuration
First you need to add at least one jobs adapter to your RoadRunner configuration. For example, such a configuration would be quite feasible to run:
Note Read more about all available drivers on the documentation page.
After starting the server with this configuration, one driver named local will be available to you.
Pushing Tasks
The following code pushes a task to the local pipeline via RPC:
Consuming Tasks
The consumer runs inside a RoadRunner worker (consumer.php from the configuration above), receives tasks and acknowledges them:
Task Acknowledgement
The Consumer processes tasks from RoadRunner server and responds based on the processing outcome:
ack- is used for positive acknowledgements.nack- is used for negative acknowledgements.requeue- is used for requeuing the task.
The behavior of the nack method depends on its implementation by the queue driver. It can accept an additional
parameter redelivery; if it is passed and set to true, the task will be requeued. However, not all drivers
support this functionality. If the redelivery parameter is not passed, set to false, or the queue driver's
implementation does not support it, the task will not be requeued.
The requeue method is implemented by RoadRunner and does not depend on the queue driver. It allows you to resend
the task to the end of the queue and add additional headers to the task.
The nack and requeue methods have the ability to specify a delay for requeuing the task. To do this, call
the withDelay method and pass the desired value before invoking the nack or requeue methods.
All versions of jobs with dependencies
ext-json Version *
ramsey/uuid Version ^3 || ^4
roadrunner/api-dto Version ^2.1
roadrunner/goridge Version ^4.5
roadrunner/roadrunner Version ^3.0
roadrunner/worker Version ^3.8