-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Respect isRetryable
decision of the retry strategy for re-delivery
#49063
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
[Messenger] Respect isRetryable
decision of the retry strategy for re-delivery
#49063
Conversation
… deciding if failed message should be re-delivered
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
Hey! I think @deguif has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
@nicolas-grekas Any chance for review? :) |
Thank you @FlyingDR. |
@FlyingDR The current docs suggest ![]() We were previously using this to retry messages which may possibly fail more times than the retry strategy. Do the docs need updating, or has this introduced a regression? It seems this makes the above interface meaningless as all messages will be retried as per retry-strategy anyway. |
It is a good point, @rodnaph, thank you. It really looks like a contradiction. From my point of view ignoring the limit which is explicitly defined in the configuration is not a good idea by itself, at least not in case if it is done silently. Also, as I wrote in the description of the pull request - there is a possibly unwanted side effect when using redelivery along with
You can still do it by creating your own service that implements
Documentation has to be updated, you're right, thank you. I will provide a PR for it. |
@FlyingDR Thanks for the clarification and suggested workaround 👍
This sounds like a separate issue that should be addressed in that retry strategy. @nicolas-grekas As it stands I think this PR should be reverted as it causes a regression in existing functionality. If it's decided that this functionality is undesirable and should be removed then that can be done by deprecating and then removing in a future release. WDYT? |
This PR has now been reverted. |
… for re-delivery" (bendavies) This PR was merged into the 5.4 branch. Discussion ---------- Revert "Respect isRetryable decision of the retry strategy for re-delivery" | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Reverts #49063 | License | MIT | Doc PR | Revert "[Messenger] Respect `isRetryable` decision of the retry strategy when deciding if failed message should be re-delivered" This reverts #49063 The linked PR rendered `RecoverableExceptionInterface` useless - i.e. it would not retry indefinately as stated in the docs. See the [discussion on the original PR](#49063 (comment)) Commits ------- dd328a2 Revert "[Messenger] Respect `isRetryable` decision of the retry strategy when deciding if failed message should be re-delivered"
Documentation for retry strategy for the Messenger component declares that message will not be retried to be re-delivered more than the value of
max_retries
configuration for the retry strategy.However, after merging #36557 actual implementation gives priority to the existence of the
RecoverableExceptionInterface
, effectively opening a way for a message to be re-delivered indefinitely.Additionally, in the case of using
multiplier
with a value of more than 1 this unlimited re-delivery causes unlimited growth of thedelay
value for theDelayStamp
. Its type is defined asint
, so on 32-bit platforms after some timedelay
value may exceedPHP_INT_MAX
which will lead to theTypeError
.The proposed change enforces respect for the
max_retries
setting value for the decision of re-delivery.