Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Messenger] BC breaking change of RecoverableExceptionInterface #50631

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

Closed
fwolfsjaeger opened this issue Jun 12, 2023 · 1 comment
Closed

[Messenger] BC breaking change of RecoverableExceptionInterface #50631

fwolfsjaeger opened this issue Jun 12, 2023 · 1 comment

Comments

@fwolfsjaeger
Copy link
Contributor

fwolfsjaeger commented Jun 12, 2023

Symfony version(s) affected

6.3

Description

The commit 8fc3dcc45d37ba5daaea5549d228cfd10adfb506 introduced a backward-compatibility breaking change in src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php.

Before this change, when throwing a RecoverableExceptionInterface, the message was retried infinitely. It is documented in to do exactly that in Force Retrying.

How to reproduce

Don't override max_retries or set it to a low number like 3 and throw a RecoverableExceptionInterface. Once the max_retries threshold is reached the message will be sent to the failed transport.

Possible Solution

Solution 1: Add a separate Exception Interface that respects the max_retries threshold and revert this commit.
Solution 2: Announce the breaking change and introduce a separate Exception Interface - or an Exception code - that ignores max_retries.

Additional Context

I'd be happy to implement solution 1 or 2 if you want.

@nicolas-grekas
Copy link
Member

Fixed by #50655

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants