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

Skip to content

RedeliveryStamp loses exception message in SendFailedMessageForRetryListener #42017

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
garak opened this issue Jul 7, 2021 · 3 comments
Closed

Comments

@garak
Copy link
Contributor

garak commented Jul 7, 2021

Symfony version(s) affected: 5.0 - 5.4

Description
In onMessageFailed method of SendFailedMessageForRetryListener, precisely in line 89, the RedeliveryStamp constructor is only called with retry count, and message is lost.

How to reproduce
Have a message fails with an error and retry. Log the tries. Instead of getting the error message, you get null.

Possible Solution
The constructor of RedeliveryStamp should be called with the second argument, too.

Current call: new RedeliveryStamp($retryCount)
New call: new RedeliveryStamp($retryCount, $throwable->getMessage())

@Jean85
Copy link
Contributor

Jean85 commented Jul 7, 2021

That info should come from the new ErrorDetailsStamp, implemented in #32904 (5.2.0).
In our case that stamp is absent, so the information is simply lost. We need to dig deeper to understand why that stamp is not attached to our failed messages.
The reason it doesn't work for us is that we're on 5.1, maybe the deprecation was erroneously backported there, dropping the info?

Also, we need to check if the listener works correctly on 5.2+. We'll update the app to at least 5.2 to check it.

@garak
Copy link
Contributor Author

garak commented Jul 8, 2021

Never mind, I didn't notice the deprecation

@garak garak closed this as completed Jul 8, 2021
@Jean85
Copy link
Contributor

Jean85 commented Jul 8, 2021

FTR, the bug seems present in 5.1, but since it's EOL it can't be fixed now.

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

4 participants