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 Batch Retry Laravel Package

kirschbaum-development/laravel-queue-batch-retry

Retry failed jobs in Laravel queue batches with a simple artisan command. This package re-dispatches failed batch jobs while preserving batch context, so you can recover from failures without manually tracking or re-queuing individual jobs.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is operator tooling, not application code, and that framing governs the whole evaluation. The package registers an Artisan command that re-dispatches failed jobs belonging to an existing Bus::batch(), reading from Laravel's native job_batches and failed_jobs tables. There are no migrations, no config file, no service-provider wiring beyond auto-discovery, and no presence on the request path. Architectural surface area is therefore near zero: it can be adopted or removed without touching product code, data models, or deployment topology. The value is operational — it converts a manual recovery procedure (query failed_jobs, copy UUIDs, re-dispatch by hand, hope you got them all) into one reproducible command with a filterable blast radius. That is a supportability improvement, not a capability expansion, and it should be scoped and resourced as such.

Integration feasibility. High and cheap. Composer install with auto-discovery, scoped as a dev/ops dependency, realistic effort well under a sprint day — most of it validation and runbook writing rather than installation. The 1.2.2 change (--exclude-filter, PR #3, first-time contributor) is a single additive flag shipped as a patch, so it drops in over 1.2.1 with no coordination cost. The honest cost is not engineering time; it is the time to empirically verify filter semantics and document them so an on-call engineer at 3am can predict what the command will do.

Technical risk.

  • Selection semantics are the primary risk. Exclusion only reduces risk if operators know precisely what it matches — job class, batch name, queue, connection, or a substring thereof — and how it composes with the include filter. Precedence on overlap is not documented; it must be established from source and tested against a staging batch, not inferred from the flag name.
  • It is a mutating operation against production state. Retrying is a write on live queue data. An over-broad selection floods workers and can duplicate customer-visible side effects; an over-broad exclusion silently skips the one job that needed to run. These failure directions are asymmetric and both are real incidents.
  • Project health is thin. 51 stars, zero dependents, a single maintainer plus one drive-by contributor, last release 2024-06-11. Bus factor is genuinely low and the package will probably lag future Laravel majors. Acceptable for tooling off the deploy path; not acceptable as a hard runtime dependency or as anything a stakeholder could describe as vendor-supported.
  • Verification gap. From the release notes alone there is no visibility into test coverage for the new flag, the Laravel/PHP support matrix, or CI breadth. This matters because the only differentiator versus core queue:retry-batch is filtering — if we don't need filters, prefer core and take the smaller risk.
  • Overlap hazard. Running this alongside Horizon or core retry commands creates multiple paths to the same mutation, the exact condition that produces double-dispatches during a stressful incident.
  • Callback integrity is unproven. The package claims to preserve batch metadata and then/catch/finally, but the edge case that matters is an empty or fully-excluded selection. If the batch never reaches a terminal state, downstream bookkeeping (status flags, customer notifications, cleanup) silently never runs.

Key questions.

  1. What attributes do --filter and --exclude-filter match against, and is the match exact, prefix/substring, or regex?
  2. Can both flags be combined in one invocation, and what wins on overlap?
  3. Is there a --dry-run, verbose mode, or count report showing the selection size before dispatch?
  4. Does a retry respect tries, maxExceptions, and allowFailures on the batch?
  5. Which Laravel and PHP versions are supported, and is there a CI matrix proving it?
  6. Is the command idempotent if invoked twice, or does it re-dispatch already-retried jobs?
  7. What happens when the selection is empty — and when every failed job is excluded — does the batch reach a terminal state so catch/finally fire?
  8. Is --exclude-filter covered by tests, and by whose CI?

Treat any "unknown" on questions 1–3 as a pilot-only constraint rather than a blocker.

Integration Approach

Stack fit. A Laravel 9+/10/11 application with Bus::batch() in active production use, on database or Redis queue drivers, with job_batches and failed_jobs present and retained. Retention is a hard dependency, not a footnote: if job_batches is pruned aggressively or failed_jobs truncated on a short schedule, the tool has nothing to act on in exactly the incident window we care about. If the application does not use native batching, the evaluation ends here. Technical coexistence with Horizon and Telescope is fine; the organizational question — which tool owns retry operations — is the one that actually needs an answer before install.

Migration path. Add as a dev/ops dependency in a feature branch, pinned at ^1.2 rather than ^1.1, so the exclusion flag is deterministically present on every ops box. Nothing to backfill, nothing to unwind, no data model change. Validate against a staging database restored from a production snapshot with genuinely failed batch jobs, not synthetic fixtures alone. Rollback is removing one Composer line plus a lockfile update — no residue. Commit the lockfile; a stale ops box on 1.2.1 is a real failure mode for a flag we've written into the runbook.

Compatibility. The PHP/Laravel support matrix is unverified in the release notes, so we establish it empirically on our exact versions before production use — a 15-minute install-and-run check, not an assumption. The forward-looking risk is Laravel major upgrades: this package depends on internal job_batches behavior, and with one maintainer we should assume a lag. Budget a verification task (or a replacement decision) into every Laravel major upgrade plan rather than discovering it mid-upgrade.

Sequencing.

  1. Confirm native batching is in production use and confirm job-batch/failed-job retention windows cover realistic recovery time.
  2. Install in a feature branch, pinned ^1.2, staging only.
  3. Read the source and establish filter semantics empirically; write three worked examples into the runbook.
  4. Exercise against a staging batch seeded with known failures: include-only, exclude-only, overlapping both, empty selection, and all-failed-jobs-excluded.
  5. Verify the batch reaches a terminal state and that then/catch/finally fire in the empty and all-excluded cases.
  6. Decide and document the single owner of retry operations across this package, core queue:retry-batch, and Horizon.
  7. Write the runbook with a mandatory count-before-dispatch step.
  8. Pilot on one non-critical, non-customer-facing batch workflow (e.g. an internal sync), supervised.
  9. Promote to the general runbook only after two clean uses and confirmation that no duplicate side effects appeared downstream.

Operational Impact

Maintenance. Steady-state effort is close to zero — no config, no schema, no service wiring to keep in sync. The concentrated cost is upgrade-time and abandonment-time: a half-day verification per Laravel major, and a fallback plan. The exit is deliberately cheap (a short internal Artisan command over job_batches/failed_jobs), which is precisely why adoption is the low-regret default. Keep the fallback scoped enough to be believable — a paragraph in the runbook, not a backlog item to be rewritten from scratch under pressure.

Support. Open-source, community-supported, no SLA, no vendor escalation path. On-call engineers must be able to self-serve from the runbook alone. Name a single owning team; an unowned retry interface is how you end up with three scripts and a double-dispatch. Do not describe this to stakeholders as a supported dependency.

Scaling. Scales with failed job volume, not throughput — it adds nothing to normal request or queue paths. The scaling risk is the retry event itself: re-dispatching thousands of jobs at once is a self-inflicted thundering herd against downstream systems (APIs, SMTP, CRM endpoints) that may still be rate-limited or degraded. Mitigations belong in the runbook: count before dispatch, prefer narrow filters, and consider targeting a dedicated retry queue or bounded chunks for large selections. Note also that retried jobs re-execute from scratch, so any per-job cost (external API call, file I/O, LLM/token spend) is paid again in full.

Failure modes.

  • Over-broad include → duplicate customer-visible side effects (double emails, duplicate invoices, duplicated CRM records). Mitigation: mandatory count-and-confirm, narrow filters.
  • Over-broad exclude → silent no-op that appears successful while the job that mattered never ran. Mitigation: post-retry verification that at least one job re-dispatched and that the expected failed-job count dropped.
  • Empty selection or all-excluded → batch never reaches a terminal state; catch/finally suppressed; downstream status flags and notifications never fire. Mitigation: explicit test in staging plus a manual terminal-state reconciliation step in the runbook.
  • Concurrent or repeated invocation → double dispatch. Mitigation: single-owner convention, one operator at a time, check batch state before re-running.
  • Filter mismatch (wrong attribute assumption) → the command runs "clean" and changes nothing. Mitigation: dry-run/count where available; observed before/after failed-job counts.
  • Missing job_batches history (pruned or truncated) → tool has nothing to act on during the incident. Mitigation: treat retention as a dependency and verify it.
  • Non-idempotent job bodies → retries duplicate data. This is our responsibility, not the package's; it needs to be stated explicitly wherever the runbook is published.
  • Package abandonment or Laravel-major lag → install-time dependency conflict during an upgrade. Mitigation: dev/ops scoping so it never blocks a deploy, plus the pre-scoped fallback.

Ramp-up. Installation is minutes; operator ramp-up is the real cost and the part that gets skipped. Budget one to two hours per on-call engineer: what each filter matches, worked examples, include/exclude precedence, the count-before-dispatch habit, and the post-retry verification step. Pair on the first live invocation and treat it as supervised until two engineers have run it independently. The measure of success is not "the package is installed" but "an on-call engineer under incident pressure can predict the blast radius of the command before pressing enter" — if that isn't true, the package has added a foot-gun rather than removed a scramble.

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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style