jeffersongoncalves/laravel-queue-consumer
A Laravel package for consuming queued jobs, providing a straightforward queue consumer that processes background tasks and integrates with Laravel's existing queue system. It helps keep application workloads moving smoothly with less custom queue plumbing.
Architecture fit
This package is a bridge between an external queue broker (the "hub") and Laravel's worker lifecycle. It synthesises a job object (SyncJob, now wrapped by HubJob) that satisfies Laravel's job contract but has no real driver behind it, then runs the payload in-process and reports completion back to the hub. That is a legitimate pattern for consuming a non-Laravel broker inside a Laravel app, but it means the package owns delivery semantics that Laravel normally owns — retries, releases, backoff. 1.2.0 is the first release that acknowledges this ownership explicitly: the previous release() implementation only flipped a flag because sync has nowhere to push, so every middleware that depends on releasing (WithoutOverlapping, RateLimited, ThrottlesExceptions, $this->release($delay)) was silently a no-op. The fix is architecturally correct — capture the discarded delay, re-post the untouched payload to the hub, and let the hub remain the source of truth. Keeping the payload unchanged so the hub needs no changes is the right call for a patch release.
Integration feasibility
Low-friction inside the consumer process: no hub-side changes required, and --queue= defaults to default, so hubs that don't send a queue name keep working. The real integration question is hub capability, not Laravel capability: release($delay) is only meaningful if the hub supports delayed re-delivery. If the hub only accepts immediate re-posts, RateLimited/ThrottlesExceptions/WithoutOverlapping turn into a tight retry loop against the hub rather than a backoff. That must be confirmed per-deployment before enabling.
Technical risk
--queue= return on default, not the originating queue. In multi-queue deployments this silently moves load and can starve the original queue. The default is backward-compatible but not behaviour-preserving.attempts, maxTries and retryUntil survive the round trip through HubJob is not stated. If attempts reset, an indefinitely-releasing job (ThrottlesExceptions) can loop forever.Key questions
attempts counter, and does the hub enforce a max-attempt cutoff?HubJob wrapper using any queue-contract API that narrowed compatibility versus 1.1.0?--queue=?Stack fit
Fits any Laravel app already running queue-consumer:run under a process supervisor. No new dependencies, no hub-side deployment. It does require that the app's jobs are written to be safely re-runnable, since released jobs now genuinely come back.
Migration path
composer require bump to ^1.2.0, restart consumers. No config migration, no hub change, no payload change. Treat it as a required patch rather than an optional feature upgrade — 1.1.0 is losing jobs. If the hub cannot be confirmed to support delayed delivery, still upgrade (silent loss is worse) but expect release-heavy jobs to hot-loop until the hub supports delay.
Compatibility
Additive CLI flag with a conservative default; existing supervisor invocations continue to work unchanged. The behavioural change is confined to released jobs, which previously did nothing observable. Audit anything that relied — accidentally — on release being a no-op: WithoutOverlapping locks now actually defer instead of letting the second job run immediately, and RateLimited now actually throttles. Expect throughput to drop on those job classes after upgrade; that is the intended semantics, but it will read as a regression on dashboards.
Sequencing
$this->release(60) and assert it comes back once, on the right queue, after roughly the delay.--queue= to every supervisor unit whose jobs can release, matching the queue the hub dispatches from.WithoutOverlapping/RateLimited/ThrottlesExceptions job classes, since their effective behaviour changes.Maintenance Small, single-maintainer-looking package (personal GitHub namespace) with a fast patch cadence on a correctness bug. The 1.2.0 fix is a good sign — it identifies a subtle semantic gap and closes it without a hub protocol change — but a package that owns delivery semantics for you is a package you must track closely. Pin the version and read changelogs.
Support
Operators need one new runbook entry: a non-zero exit from queue-consumer:run may now mean "hub refused a re-post," not "job failed." That distinction determines whether you page the hub team or the app team. Also add a note that released-then-dropped jobs may exist in historical 1.1.0 windows.
Scaling Re-posts add hub write traffic proportional to release rate. Rate-limited and exception-throttled jobs — precisely the ones that release most — will now generate the most hub traffic, where previously they generated none. Delayed re-posts hold messages in the hub for the delay duration, which raises hub queue depth and may need capacity review. Worker count is unaffected.
Failure modes
--queue= → released jobs migrate to default, starving the origin queue.ThrottlesExceptions jobs.Ramp-up
Low for developers — no API surface to learn, one optional flag. Moderate for operators, because the failure semantics changed from silent to loud and the queue-routing default is a footgun. Budget a short session covering the runbook, the --queue= requirement per supervisor unit, and the idempotency expectation for re-delivered jobs.
How can I help you explore Laravel packages today?