Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Queue Consumer Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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

  • Severity of the defect being fixed. Prior to 1.2.0, released jobs were acknowledged as delivered and dropped: no exception, no failed job, no log on either side. That is silent data loss with at-most-once semantics, and it is invisible to any monitoring that watches for failures rather than for absence of work. Any 1.1.0 deployment should be treated as having potentially lost jobs, and a reconciliation/backfill may be warranted.
  • New failure mode is loud, which is better but still a crash. A hub that refuses the re-post now fails the command. That converts silent loss into a worker outage — correct behaviour, but it needs supervision and alerting in place before rollout.
  • Queue routing default. Released jobs from a worker not started with --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.
  • Duplicate delivery. A re-post that succeeds at the hub but whose acknowledgement is lost will be redelivered. Jobs must remain idempotent; nothing in this release provides deduplication.
  • Retry accounting is unspecified. Whether 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

  1. Does the hub support delayed re-posting, and what is its minimum/maximum delay granularity?
  2. Does the re-posted payload carry an incremented attempts counter, and does the hub enforce a max-attempt cutoff?
  3. What is the supported Laravel/PHP version matrix for 1.2.0 — is the HubJob wrapper using any queue-contract API that narrowed compatibility versus 1.1.0?
  4. What does "fail loudly" mean concretely — non-zero exit code only, or also a log line and a failed-job record?
  5. Can the queue name be recovered from the payload rather than requiring every worker to be started with --queue=?

Integration Approach

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

  1. Confirm hub delayed-delivery support; if absent, open a hub-side ticket first.
  2. Upgrade the package in staging; run a canary job that calls $this->release(60) and assert it comes back once, on the right queue, after roughly the delay.
  3. Add --queue= to every supervisor unit whose jobs can release, matching the queue the hub dispatches from.
  4. Ship to production with supervision and exit-code alerting already live.
  5. Roll out in the same window as a review of WithoutOverlapping/RateLimited/ThrottlesExceptions job classes, since their effective behaviour changes.

Operational Impact

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

  1. Hub refuses re-post → command exits non-zero → worker dies if unsupervised; mitigated by supervisor + alerting.
  2. Hub lacks delayed delivery → immediate re-post → hot-loop / retry storm on throttled jobs.
  3. Worker started without --queue= → released jobs migrate to default, starving the origin queue.
  4. Redelivery after lost ack → duplicate side effects without idempotent handlers.
  5. Attempts not incremented → unbounded release loop on ThrottlesExceptions jobs.
  6. Residual 1.1.0 data loss → gaps in historical processing with no failure signal.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console