Billions of jobs processed in production since 2012. MongoDB-backed, fault-tolerant, with smart retry policies and full job history.
composer require recruiterphp/recruiter
class EmailJob implements Workable
{
use WorkableBehaviour;
public function execute(): void
{
mail(
$this->parameters['email'],
$this->parameters['subject'],
$this->parameters['body']
);
}
}
// Enqueue it — fire and forget
new EmailJob([
'email' => 'user@example.com',
'subject' => 'Welcome!',
'body' => 'Thanks for joining!',
])
->asJobOf($recruiter)
->retryWithPolicy(
ExponentialBackoff::inHours(1, 3, 9)
)
->inBackground()
->execute();
Designed for the hardest jobs — where losing work is never an option.
Born at Onebip in 2012 for mobile payment processing — where duplicate or dropped jobs mean financial loss. Adopted by EasyWelfare in 2018, processing billions of corporate benefit jobs.
Exponential backoff, linear delays, and custom strategies. Failed jobs retry intelligently without overwhelming downstream systems or violating rate limits.
Route jobs to specific workers using tags and filters. Run multiple logical queues in a single deployment — prioritize critical work without separate infrastructure.
Every execution is tracked: start time, end time, result, retry count, error details. Built-in analytics make debugging and monitoring straightforward.
Graceful shutdown, POSIX signal handling, and crash recovery built in. Jobs are never silently dropped. Workers recover automatically from unexpected failures.
Leverages MongoDB's atomic operations, indexes, and TTL collections for efficiency at scale. No ORM overhead, native BSON serialization, and distributed-safe locking.
From zero to a working job queue in three steps.
composer require recruiterphp/recruiter
use Recruiter\Workable;
use Recruiter\WorkableBehaviour;
class ProcessOrderJob implements Workable
{
use WorkableBehaviour;
public function execute(): void
{
$orderId = $this->parameters['order_id'];
// Your job logic here...
}
}
// Enqueue a job
new ProcessOrderJob(['order_id' => 42])
->asJobOf($recruiter)
->retryWithPolicy(ExponentialBackoff::inHours(1, 3, 9))
->inBackground()
->execute();
// In a separate process — start the worker
$worker = $recruiter->hire();
$worker->workForever();
Each package is independently available, battle-tested, and usable in any PHP project — with or without Recruiter.
The battle-tested PHP job queue. MongoDB-backed persistence, smart retry policies, full job history, multi-queue support, and fault-tolerant workers.
PSR-20 clock implementation with testable time manipulation and native MongoDB UTCDateTime support at microsecond precision.
MongoDB-based distributed locking for coordinating concurrent operations across multiple processes and servers.
Tools for building robust long-running PHP processes — POSIX signal handling, graceful shutdown, and memory-aware execution loops.
Elegant value object library for PHP. Immutable, structurally equal, with rich type validation and minimal boilerplate.
Event sourcing projection library for PHP. Build and maintain domain event projections with snapshot support, built on geezer.
The array functions you wish were part of PHP. Functional, consistent, and iterable-aware replacements for PHP's built-in array_* functions.
Parse, format, convert, and manipulate byte units. Supports both Metric (kB/MB/GB) and Binary (KiB/MiB/GiB) unit systems.
Not a weekend project. Forged in the heat of real production demands where failure has real costs.
Created for a major mobile payments platform processing millions of jobs daily. The constraint was absolute: payments cannot be lost or duplicated. This shaped every architectural decision.
After two years of production validation, Recruiter was open sourced under the MIT license and made available to the broader PHP community.
A second major production deployment — corporate benefits management, processing billions of jobs across the platform. Proven reliability at a new scale.
The original production operators concluded their PHP journey. The codebase — refined over a decade of real-world demands — remains open, maintained, and ready.
Resurrected and modernized by @dbellettini — strict types, readonly properties, enums, and full PHP 8.4+ support. The battle-tested core preserved; the surface area brought into the modern era.
Extended compatibility to PHP 8.5, keeping pace with the latest PHP releases while maintaining full backward compatibility.
Join the production systems that have trusted Recruiter with their most critical background work.