-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Fix exception message of failed message is dropped on retry #33600
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
Conversation
NOTE: The test case will failed on Symfony 4.4, because component |
src/Symfony/Component/Messenger/Tests/Command/FailedMessagesRetryCommandTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Command/FailedMessagesRetryCommandTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Command/FailedMessagesRetryCommandTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Command/FailedMessagesRetryCommandTest.php
Show resolved
Hide resolved
Thank you @tienvx. |
…pped on retry (tienvx) This PR was merged into the 4.3 branch. Discussion ---------- [Messenger] Fix exception message of failed message is dropped on retry | Q | A | ------------- | --- | Branch? | 4.3 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #32719 | License | MIT | Doc PR | NA <!-- required for new features --> <!-- Replace this notice by a short README for your feature/bugfix. This will help people understand your PR and can be used as a start for the documentation. Additionally (see https://symfony.com/roadmap): - Always add tests and ensure they pass. - Never break backward compatibility (see https://symfony.com/bc). - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too.) - Features and deprecations must be submitted against branch 4.4. - Legacy code removals go to the master branch. --> Commits ------- 8f9f44e [Messenger] Fix exception message of failed message is dropped on retry
This fixes #32311 and invalidates #32341 where @weaverryan wanted to go with a different solution. |
This most likely also invalidates #32904, unless the separation is still something we want to do in the future. |
I wasn't aware of the other issues/PRs; tell me how you want to proceed @weaverryan |
We need to revert this in #34082 as it's breaking the retry on amqp when the message gets too big. |
…e is dropped (Tobion) This PR was merged into the 4.3 branch. Discussion ---------- Revert "[Messenger] Fix exception message of failed message is dropped | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | | License | MIT | Doc PR | This reverts #33600 because it makes the message grow for each retry until AMQP cannot handle it anymore. On each retry, the full exception trace is added to the message. So in our case on the 5th retry, the message is too big for the AMQP library to encode it. AMQP extension then throws the exception > Library error: table too large for buffer (ref. alanxz/rabbitmq-c#224 and php-amqp/php-amqp#131) when trying to publish the message. To solve this, I suggest to revert #33600 (this PR) and merge #32341 instead which does not re-add the exception on each failure. Btw, the above problem causes other problematic side-effects of Symfony messenger. As the new retry message fails to be published with an exception, the old (currently processed message) also does not get removed (acknowledged) from the delay queue. So rabbitmq redelivers the message and the same thing happens forever. This can block the consumers and have a huge toll on your service. That's just another case for #32055 (comment). I'll try to fix this in another PR. Commits ------- 3dbe924 Revert "[Messenger] Fix exception message of failed message is dropped on retry"
Uh oh!
There was an error while loading. Please reload this page.