-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Allow setting retry delay by RecoverableExceptionInterface
#57915
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
Merged
nicolas-grekas
merged 1 commit into
symfony:7.2
from
valtzu:use-retry-delay-from-throwable
Aug 13, 2024
Merged
[Messenger] Allow setting retry delay by RecoverableExceptionInterface
#57915
nicolas-grekas
merged 1 commit into
symfony:7.2
from
valtzu:use-retry-delay-from-throwable
Aug 13, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94noni
reviewed
Aug 4, 2024
src/Symfony/Component/Messenger/Exception/RecoverableExceptionInterface.php
Outdated
Show resolved
Hide resolved
77c2847
to
7d7f161
Compare
nicolas-grekas
approved these changes
Aug 8, 2024
src/Symfony/Component/Messenger/Exception/RecoverableExceptionInterface.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Exception/RecoverableMessageHandlingException.php
Outdated
Show resolved
Hide resolved
7d7f161
to
183a23c
Compare
183a23c
to
68a096c
Compare
Thank you @valtzu. |
RecoverableExceptionInterface
Merged
javiereguiluz
added a commit
to symfony/symfony-docs
that referenced
this pull request
Dec 2, 2024
This PR was squashed before being merged into the 7.2 branch. Discussion ---------- [Messenger] Document `getRetryDelay()` Documentation for code [57915](symfony/symfony#57915) Commits ------- 646e199 [Messenger] Document `getRetryDelay()`
fabpot
added a commit
that referenced
this pull request
Jan 25, 2025
…xceptionInterface` (AydinHassan) This PR was merged into the 7.2 branch. Discussion ---------- [Messenger ] Extract retry delay from nested `RecoverableExceptionInterface` | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | n/a | License | MIT Hey, In #57915 the ability to add a retry delay to `RecoverableExceptionInterface` was implemented. However, I noticed while debugging that it in my case the custom delay was not being applied because `RecoverableExceptionInterface` is wrapped in a `HandlerFailedException` in: https://github.com/symfony/symfony/blob/7a16efefdee2d282cd6ccfd6ecb0b82ff5a06936/src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php#L124 For detecting whether we should retry we already unwrap `HandlerFailedException` so I implemented a similar method to fetch the delay, simply getting it from the first `RecoverableExceptionInterface`. Maybe we need something more advanced, so your feedback there would be appreciated! Commits ------- 4a02222 [Messenger ] Extract retry delay from nested `RecoverableExceptionInterface`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow overriding retry delay from the retry strategy by providing it in the exception. Example use case is retrying http request based on
Retry-After
header.