Overview
BullMQ PHP is designed as a producer-only client, focusing on adding jobs to queues efficiently and reliably.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.
Key Features
- Add jobs to queues - Single and bulk job operations
- Job scheduling - Support for delayed jobs
- Priority queues - Process important jobs first
- Job retry - Configurable retry strategies with backoff
- Queue management - Pause, resume, clean, and drain queues
- Job introspection - Get job states and queue statistics
- Parent-child jobs - Support for job flows and dependencies
- Interoperability - Full compatibility with BullMQ workers in Node.js, Python, and Elixir
Requirements
- PHP 8.1 or higher
- Redis 5.0 or higher (6.2+ recommended)
- Composer
Use Cases
PHP BullMQ is ideal for:- Adding background jobs from PHP web applications
- Integrating PHP systems with BullMQ-based job processing infrastructure
- Building hybrid systems where jobs are created in PHP and processed in Node.js, Python, or Elixir
- Scheduling tasks from PHP applications
Version
Current version: 1.0.1Architecture
The PHP client communicates with Redis using the same Lua scripts as other BullMQ implementations, ensuring full compatibility. Jobs added via PHP are indistinguishable from jobs added via other languages.Supported Operations
Queue Operations
- Add single and bulk jobs
- Get job information and state
- Pause and resume queues
- Clean old jobs
- Drain and obliterate queues
- Retry and promote jobs
- Get job counts and statistics
Job Options
- Custom job IDs
- Delays and scheduling
- Priority
- Retry attempts and backoff
- Removal policies (removeOnComplete, removeOnFail)
- LIFO ordering
- Parent-child relationships
Interoperability
Jobs added with the PHP client are fully compatible with BullMQ workers in:- Node.js - Using the official BullMQ package
- Python - Using the BullMQ Python package
- Elixir - Using the BullMQ Elixir package
Next Steps
Installation
Install BullMQ PHP using Composer
Usage Guide
Learn how to add jobs and manage queues
Changelog
View release history and updates
GitHub
View the source code and examples
