Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

A failing handler aborts the whole run and blocks everything behind it

Offen
#343 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
47/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
php

Rechercherichtung

Read QueueConsumer::run(), QueueConsumer::handle(), and the failure path through Worker::process() and FailureFinalHandler; inspect stubs/InMemoryAdapter.php:53-56 for how failed messages remain queued. Decide how exhausted failures should affect the run, then check that later messages are handled and the failed message has the intended queue behavior.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

One message whose handler throws ends QueueConsumer::run() for everything behind it, and the failing message stays in the queue, so the next run stops at the same place.

Three messages, the second one's handler throws:

run #1 THREW MessageFailureException: Processing of message without ID is stopped because of an exception: handler blew up.
handled so far: ["first"]
still queued:   ["poison:second","good:third"]

run #2 THREW MessageFailureException: ... (identical)
handled so far: ["first"]
still queued:   ["poison:second","good:third"]

third is never processed, and re-running does not help: queue:run exits at the same message every time.

Mechanically: Worker::process() rethrows as MessageFailureException once the failure pipeline is exhausted (FailureFinalHandler rethrows by design), the exception travels through QueueConsumer::handle() and out of InMemoryAdapter::runExisting(), which also skips the unset() for the current message (stubs/InMemoryAdapter.php:53-56).

A failure middleware that swallows or re-pushes avoids this, so there is a way out. But the default for a queue — stop at the first bad message, retry it forever, never reach the rest — seems worth a decision rather than a configuration note.

Per-message isolation in QueueConsumer::run(), where a message that exhausts its failure pipeline is logged and skipped rather than aborting the loop, would bound the damage to the message that caused it.

Vorherrschende Sprache
PHP
Sterne
61
Forks
31
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus yiisoft/queue

Alle Issues in yiisoft/queue

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.