recruiterphp / recruiter
Job Queue Manager: high performance, high volume, persistent, fault tolerant. 100% PHP/MongoDB, 100% Awesome
Installs: 1 619
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 1
Forks: 0
Open Issues: 1
Requires
- php: ^8.4
- ext-bcmath: *
- ext-mongodb: >=1.1
- ext-posix: *
- dragonmantank/cron-expression: ^3.4
- gabrielelana/byte-units: ^0.5
- mongodb/mongodb: ^2.1
- monolog/monolog: ^3.9
- psr/log: ^3.0
- recruiterphp/concurrency: ^5.0
- recruiterphp/geezer: ^7.0
- symfony/console: ^7.3
- symfony/event-dispatcher: ^7.3
- ulrichsg/getopt-php: ^4.0
Requires (Dev)
- ext-pcntl: *
- dms/phpunit-arraysubset-asserts: ^0.5
- ergebnis/composer-normalize: ^2.47
- friendsofphp/php-cs-fixer: ^3.85
- giorgiosironi/eris: ^1.0
- phpstan/phpstan: *
- phpunit/phpunit: ^10.0
- rector/rector: ^2.1
- symfony/var-dumper: ^7.3
Suggests
- symfony/console: In order to use Recruiter\Command\RecruiterJobCommand.
README
A battle-tested job queue manager for PHP, with billions of jobs processed over the years in production environments.
โจ Features
- ๐ Production Ready - Billions of jobs processed over the years with proven reliability
- ๐ Advanced Retry Policies - Exponential backoff, custom strategies
- ๐ท๏ธ Multi-Queue Support - Job tagging and filtering
- ๐ Full Job History - Built-in analytics and monitoring
- ๐ก๏ธ Fault Tolerant - Graceful failure handling and recovery
- โก High Performance - Optimized for scale with MongoDB
- ๐ณ Docker Ready - Complete development environment included
- ๐งช Fully Tested - Comprehensive test suite with property-based testing
Requirements
- PHP 8.4+
- MongoDB Extension >=1.15
- MongoDB Server 4.0+
Installation
composer require recruiterphp/recruiter
Quick Start
use Recruiter\Recruiter; use Recruiter\Workable; use Recruiter\WorkableBehaviour; use MongoDB\Client; // Create a job class class EmailJob implements Workable { use WorkableBehaviour; public function execute(): void { // Write your logic here mail( $this->parameters['email'], $this->parameters['subject'], $this->parameters['body'] ); } } // Connect to MongoDB $factory = new Factory(); $db = $factory->getMongoDb( MongoURI::fromEnvironment(), $options = [], ); // Set up Recruiter $recruiter = new Recruiter($db); // Schedule a job new EmailJob([ 'email' => 'user@example.com', 'subject' => 'Welcome!', 'body' => 'Thanks for joining us!' ]) ->asJobOf($recruiter) ->inBackground() ->execute();
๐ข Production Heritage
Recruiter was born at Onebip in 2012, a major mobile payment platform processing millions of jobs daily. After being reengineered and open sourced in 2014, it was later adopted by EasyWelfare in 2018, with billions of jobs processed across both platforms:
- โ Jobs cannot be lost (payments aren't idempotent)
- ๐ Jobs must be traceable (for customer support)
- โฐ Failed jobs need smart retry logic (respecting rate limits)
After billions of jobs processed in production (2012-2024) and active development until 2020, Recruiter has proven its reliability across diverse production environments. Both original platforms have since been phased out due to corporate acquisitions, but in July 2025 Recruiter received a major modernization, ensuring it continues as a proven, independent solution with over a decade of battle-tested experience.
๐ Development
# Clone and set up development environment git clone https://github.com/recruiterphp/recruiter.git cd recruiter # Start development environment make build && make up # Run tests make test # Code quality checks make fix-cs # Fix code style make phpstan # Static analysis make rector # Code modernization
๐ Documentation
- Complete Documentation - Comprehensive guides and API reference
- Website - Project overview and quick start (Work in Progress)
- Examples - Ready-to-run code examples
๐ค Related Projects
Part of the RecruiterPHP ecosystem:
- concurrency - MongoDB-based distributed locking
- geezer - Tools for robust long-running processes
- clock - Testable time handling and MongoDB integration
- precious - Value object library
- zeiss - Event sourcing projections