Enqueue jobs from PHP
A PHP client for BullMQ. Add jobs to a queue from your PHP application and process them with workers written in Node.js, Python or Elixir.
composer require taskforcesh/bullmq-php
PHP 8.1+ · Composer · Redis 5.0+ (6.2+ recommended)
Your first queue and worker
The PHP library only adds jobs to queues. The jobs are processed by workers written in Node.js, Python or Elixir.
use BullMQ\Queue;
$queue = new Queue("Paint");
$job = $queue->add("cars", [
"color" => "blue",
"delay" => 30000
]);More PHP examples
Common BullMQ features, written in PHP.
Repeatable jobs
use BullMQ\Queue;
$queue = new Queue("Paint");
// Repeat job once every day at 3:15 (am)
$job = $queue->add(
"submarine",
["color" => "yellow"],
[
"repeat" => [
"pattern" => "* 15 3 * * *"
]
]
);Retries & backoff
use BullMQ\Queue;
$queue = new Queue("Paint");
$job = $queue->add(
"car",
["color" => "pink"],
[
"attempts" => 3,
"backoff" => [
"type" => "exponential",
"delay" => 1000
]
]
);Using BullMQ with PHP
Adds jobs only
The PHP library adds jobs to queues. There is no PHP worker, so the jobs are processed by workers written in Node.js, Python or Elixir.
Any framework
Call it from a Laravel or Symfony controller, a console command or plain PHP to move slow work out of the request.
Same data format
Jobs are stored in the same Redis data structures that every other BullMQ library uses, so any worker can read them.
One queue, any language
Add jobs from PHP and process them with Node.js, Python or Elixir workers.
What's available in PHP
- Add jobs to queues Supported
- Process jobs (workers) Not available
- Delayed jobs Supported
- Repeatable / scheduled jobs Supported
- Job priorities Supported
- Rate limiting Not available
- Retries & backoff Supported
- Flows (parent / child) Not available
- Job events Not available
- Redis backend Supported
- PostgreSQL backend Coming soon
- BullMQ Pro Coming soon
BullMQ Pro for PHP Coming soon
BullMQ Pro adds groups, observables and batches to the open source library. It is available for Node.js and Bun today, and support for PHP is on the way.