-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Do not stack retry stamp #36810
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
Why not 4.4 since it's a bug fix proposal? |
indeed. fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ref. #34082
Removing the RedeliveryStamps breaks the history feature, see
symfony/src/Symfony/Component/Messenger/Command/AbstractFailedMessagesCommand.php
Lines 88 to 93 in 25c4889
/** @var RedeliveryStamp[] $redeliveryStamps */ | |
$redeliveryStamps = $envelope->all(RedeliveryStamp::class); | |
$io->writeln(' Message history:'); | |
foreach ($redeliveryStamps as $redeliveryStamp) { | |
$io->writeln(sprintf(' * Message failed at <info>%s</info> and was redelivered', $redeliveryStamp->getRedeliveredAt()->format('Y-m-d H:i:s'))); | |
} |
We need to limit the stamps to the last x so it does still have history but does not grow endlessly. This has been started in #32904 alread.
Good catch @Tobion Tell me what you think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be really helpful!
Anything missing? Can we merge this?
@Tobion Can you have a look at this one? |
src/Symfony/Component/Messenger/EventListener/SendFailedMessageForRetryListener.php
Outdated
Show resolved
Hide resolved
7a82f39
to
b98038c
Compare
b98038c
to
ad6f853
Compare
Thank you @jderusse. |
With the "RecoverableException" or a very high number of retry, the message is currently stacking a lot of stamp, which increase the size of the message sent to queue and (in my case) reach the "maximum size allowed" after 60 retries + php serializer
This PR removes previous stamps before adding the new Delay+RetryStamps.