-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] no possibility to prevent retrying at this moment | UnrecoverableMessageHandlingException not working #32325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Confirmed, see symfony/src/Symfony/Component/Messenger/Worker.php Lines 132 to 136 in 7bd0a27
Suggestion as bug-fix:
Suggestion as new feature:
|
+1
Yes, certainly for 4.3. But also, we could (in
That is certainly very sensible. |
…LanaiGrunt) This PR was merged into the 4.3 branch. Discussion ---------- [Messenger] Fix UnrecoverableExceptionInterface handling | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #32325 | License | MIT | Doc PR | no Fixed the handling of UnrecoverableExceptionInterface-Exceptions like suggested in [the issue thread](#32325 (comment)). Commits ------- 49bb743 [Messenger] fixed UnrecoverableExceptionInterface handling in Worker (fixes #32325)
…LanaiGrunt) This PR was merged into the 4.3 branch. Discussion ---------- [Messenger] Fix UnrecoverableExceptionInterface handling | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #32325 | License | MIT | Doc PR | no Fixed the handling of UnrecoverableExceptionInterface-Exceptions like suggested in [the issue thread](symfony/symfony#32325 (comment)). Commits ------- 49bb7435f1 [Messenger] fixed UnrecoverableExceptionInterface handling in Worker (fixes #32325)
* 4.3: fix tests [Validator] Added support for validation of giga values Fix Debug component tests [Messenger] fixed UnrecoverableExceptionInterface handling in Worker (fixes #32325) [Messenger] pass transport name to factory
* 4.4: fix tests [Validator] Added support for validation of giga values Fix Debug component tests [Messenger] fixed UnrecoverableExceptionInterface handling in Worker (fixes #32325) [Messenger] pass transport name to factory
…LanaiGrunt) This PR was merged into the 4.3 branch. Discussion ---------- [Messenger] Fix UnrecoverableExceptionInterface handling | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #32325 | License | MIT | Doc PR | no Fixed the handling of UnrecoverableExceptionInterface-Exceptions like suggested in [the issue thread](symfony/symfony#32325 (comment)). Commits ------- 49bb7435f1 [Messenger] fixed UnrecoverableExceptionInterface handling in Worker (fixes #32325)
v4.3.2
When using async transport,
UnrecoverableMessageHandlingException
business logic does not work at this moment at all.Symfony\Component\Messenger\Middleware\HandleMessageMiddleware:82
wraps all\Throwable
(not onlyUnrecoverableExceptionInterface
exceptions) occurred in handlers inSymfony\Component\Messenger\Exception\HandlerFailedException
, whenSymfony\Component\Messenger\Worker:194
wants onlyUnrecoverableExceptionInterface
.At this moment the only possible solution to prevent retrying is disable totally retrying strategy.
To reproduce, just throw
UnrecoverableExceptionInterface
in any kind of async handlers (i did not test on sync handlers, but think that situation is the same).As a solution, it's be better to check payload of
HandlerFailedException
inWorker
.The text was updated successfully, but these errors were encountered: