Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #49063 [Messenger] Respect
isRetryable
decision of the retry st…
…rategy for re-delivery (FlyingDR) This PR was merged into the 5.4 branch. Discussion ---------- [Messenger] Respect `isRetryable` decision of the retry strategy for re-delivery | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | [Documentation](https://symfony.com/doc/5.4/messenger.html#retries-failures) 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](https://github.com/symfony/symfony/blob/39cd93a9f7ea072b26853e87ceb1142d6dd019b0/src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php#L126-L128) 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 the `delay` value for the `DelayStamp`. Its type is defined as `int`, so on 32-bit platforms after some time `delay` value may exceed `PHP_INT_MAX` which will lead to the `TypeError`. The proposed change enforces respect for the `max_retries` setting value for the decision of re-delivery. Commits ------- 8fc3dcc45d [Messenger] Respect `isRetryable` decision of the retry strategy when deciding if failed message should be re-delivered
- Loading branch information