barryvdh/laravel-async-queue
Laravel Async Queue adds an async queue driver that runs queued jobs in background PHP processes instead of requiring a long-running queue worker. Useful on shared hosting or simple deployments where daemons aren’t available, while keeping Laravel’s queue API.
queue:work daemon to operate. This moves a feature from "requires platform work" to "one config line and a job class," which is a real roadmap acceleration.dispatch() call sites, same job classes — provided jobs are written idempotently from day one. That constraint is a product decision made now that preserves optionality later.proc_open is available but process supervision is not. At early stage this is a direct cost lever, and it should be weighed explicitly against the ops cost of a managed broker.max_execution_time. Treat this as best-effort async, not a durable queue. Anything with money, compliance, or "must not be lost" semantics needs a real broker, and product specs must say so.Consider it when most of these hold:
proc_open / process spawning with a PHP CLI binary at a known path. Confirm this on the real production image early — many hardened hosts disable it, which kills the approach outright.Look elsewhere when any of these hold:
max_execution_time with no supervisor to notice or restart.Adoption checklist before committing: verify proc_open and CLI discovery on production and staging; pin 0.8.1 and confirm the Laravel/PHP support matrix against your deployed version; fork to an internal mirror with a named owner; add the async connection alongside the existing one rather than replacing it; ship one canary job end-to-end and measure spawn overhead and failure visibility; document the best-effort contract in the codebase so nobody later assumes retries exist; and write down the trigger condition and owner for migrating to a real broker.
To executives (the 60-second version): This is a small, low-cost dependency that lets us ship background processing — emails, webhooks, generated documents — without standing up and operating queue infrastructure. It buys faster time-to-market and keeps our hosting options open, at the price of a best-effort guarantee: work runs shortly after the user's request completes, but it isn't durably retried if the process dies. That trade is correct for our current feature set and wrong for anything financial or contractual, and we've scoped it that way. One important caveat: the project is archived upstream, so this is a deliberate bridge, not a long-term foundation. We pin the version, keep the old connection for rollback, and swap the queue driver when volume or delivery guarantees justify it — application code doesn't change, provided we hold the line on short, idempotent, side-effect-tolerant jobs.
To engineering: Adopt as the async queue driver for short, idempotent, side-effect-tolerant jobs only. Two non-negotiables: (1) every job must be safely re-runnable and safely skippable — no retries are coming to save you; (2) keep durations well under max_execution_time and payloads small. Verify proc_open and PHP CLI discovery are permitted in prod and staging before we plan around it. Pin 0.8.1 specifically — 0.8.0 has a deferred-service-provider defect that can fail to resolve the driver binding depending on boot order, and that class of bug hides under Octane, early connection resolution in tests, and partial-boot console commands. v0.8.1 is a pure patch to that registration with no API or config change, so it takes the normal upgrade cadence. Mirror the tag to internal Git so we own it rather than depend on an archived repo. Also verify queue:restart, queue:retry, and queue:failed behave sensibly — operator muscle memory won't transfer cleanly, and failed-job visibility is limited to what the backing store and failed_jobs table expose.
To the product team: You can now write "this happens in the background" into acceptance criteria for non-critical, short-running side effects. Anything where "it must happen exactly once, eventually" appears in the requirements is out of scope — flag it and we'll route it to a real broker. Because the upstream project is archived, treat this as a capacity we're borrowing, not building on: assume the package will not receive fixes, so keep the surface area small and the exit cheap. Instrument the two failure modes that matter — a dispatch that silently spawns nothing, and a spawned process that dies mid-job — and alert on queue-depth versus processed-count divergence, because dispatch will look successful either way.
How can I help you explore Laravel packages today?