A failing handler aborts the whole run and blocks everything behind it
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
- Bereich
- backend, distributed-systems
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
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus yiisoft/queue
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 54/100
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Automattic/blocks-engine#2866 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
community-scripts/ProxmoxVE#17944 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
EasyCorp/EasyAdminBundle#7861 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
backend gamification P0
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
semanadeinformatica/website#461 ·