Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Messenger] Allow setting retry delay byRecoverableExceptionInterface
#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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
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
src/Symfony/Component/Messenger/Exception/RecoverableExceptionInterface.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
77c2847
to7d7f161
Comparenicolas-grekas approved these changesAug 8, 2024
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Exception/RecoverableExceptionInterface.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Messenger/Exception/RecoverableMessageHandlingException.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
7d7f161
to183a23c
Compare183a23c
to68a096c
CompareThank you@valtzu. |
00c81a7
intosymfony:7.2 5 of 10 checks passed
Uh oh!
There was an error while loading.Please reload this page.
RecoverableExceptionInterface
Merged
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestDec 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 requestJan 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 | MITHey,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#L124For 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 freeto 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.
Uh oh!
There was an error while loading.Please reload this page.
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.