pekkis/queue
Lightweight PHP queue library with pluggable backends such as Redis and AMQP. It offers producer/consumer abstractions and a queue manager for simple, reliable background job processing in Laravel or any PHP application.
composer require pekkis/queue and immediately open vendor/pekkis/queue/ — the repository is not publicly indexed, so the source tree (not the README) is your source of truth for the actual interface names, backend implementations, and constructor signatures.dispatch() helper first. This is a standalone abstraction, not a Laravel queue driver. The fastest first use case is a single non-Laravel-shaped workload: a CLI command or an artisan command that pushes a serialized job payload onto a backend and a long-running worker command that pops and processes it, all behind the package's interface.Queue::push, dispatch, Horizon, queue:work) for anything that benefits from Laravel's job lifecycle: retries, failed_jobs, batching, middleware, events. Use pekkis/queue only where you need backend portability or need to consume from a queue that Laravel does not drive. Mixing them in one code path (e.g., dispatching via Laravel but consuming via this package) is where teams get burned — pick one owner per queue.handle(array $payload): void) and let the package handle transport only. The abstraction library should not dictate your domain job signatures; keep serialization explicit and versioned.--once, --max-jobs, and --sleep flags, plus signal handling via pcntl or Laravel's Signal-style traps. Supervise it with Supervisor or systemd, exactly as you would queue:work. Long-running workers that never exit are the default failure mode of hand-rolled abstractions.TestCase::setUp. This is usually easier than mocking the concrete adapter and gives you assertion helpers ("was a payload pushed?").config/queue.php under a custom key (e.g., queue.connections.external) and resolve them in your provider. Do not let the package read env vars directly if it offers that — centralize it.Queue connector, no Job class integration, no failed_jobs table, no retry/backoff semantics for free. If your team assumes dispatch(new MyJob) will route through this package, you will spend a sprint discovering it does not.NOASSERTION. That is a legal flag, not a cosmetic one — no recognized SPDX license was declared. Get sign-off before shipping it in a commercial product, and check the actual LICENSE/composer.json in vendor/ rather than trusting the Packagist metadata.composer.json require for the PHP and extension constraints before adopting; a package like this often pins php: ^7.x and needs a fork.serialize() (class-name coupling, unsafe on untrusted input), and stamp a schema version into every payload so you can evolve job shapes without draining the queue.How can I help you explore Laravel packages today?