Introduction

BullMQ PHP client for adding jobs to queues.

The PHP package provides a Queue client that allows you to add jobs to BullMQ queues from your PHP applications. These jobs can then be processed by workers written in Node.js, Python, or Elixir.

circle-info

The PHP package only implements the Queue class (producer side). Workers are not included as PHP's execution model is not well-suited for long-running worker processes. Use Node.js, Python, or Elixir workers to process the jobs.

Installation

Download the latest release from the releases pagearrow-up-right (look for bullmq-php-X.X.X.zip), extract it to your project, and configure Composer:

{
  "repositories": [
    {
      "type": "path",
      "url": "./bullmq-php-X.X.X"
    }
  ],
  "require": {
    "taskforcesh/bullmq-php": "*"
  }
}

Then run:

composer install

Option 2: Install from GitHub (Development)

For development or the latest changes, install directly from the repository:

circle-exclamation

Requirements

  • PHP 8.1 or higher

  • Redis 5.0 or higher (6.2+ recommended)

  • Composer

Get started

You can add jobs to a queue like this:

Job Options

You can pass various options when adding jobs:

Adding Multiple Jobs

Queue Management

Interoperability

Jobs added with the PHP client are fully compatible with BullMQ workers in:

Example Node.js worker that processes jobs added from PHP:

Connection Options

Retry and Promote Jobs

circle-exclamation

More Information

For more details, see the PHP READMEarrow-up-right on GitHub.

Last updated

Was this helpful?