-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] WorkerMessageRetriedEvent
filled with not actual Envelope
#52914
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
Labels
Comments
WorkerMessageRetriedEvent
filled with not actual Envelope
Hey, thanks for your report! |
Could I get an answer? If I do not hear anything I will assume this issue is resolved or abandoned. Please get back to me <3 |
fabpot
added a commit
that referenced
this issue
Jul 5, 2024
…riedEvent` (daffoxdev) This PR was merged into the 5.4 branch. Discussion ---------- [Messenger] Passing actual `Envelope` to `WorkerMessageRetriedEvent` | Q | A | ------------- | --- | Branch? |5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #52914 | License | MIT In `SendFailedMessageForRetryListener` fixed the `Envelope` instance that passes to `WorkerMessageRetriedEvent`. Now it is instance of `Envelope` the that is returned by transport sender and could include such stamps as `TransportMessageIdStamp`. Previously to the event passed the not actual envelope that is created before passed to `send()` - changes in SendFailedMessageForRetryListener - added new test for this case in `SendFailedMessageForRetryListenerTest` Commits ------- 9b4cc57 [Messenger] Passing to `WorkerMessageRetriedEvent` envelope with actual stamps after sent
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Hi!
In
Symfony\Component\Messenger\EventListener\SendFailedMessageForRetryListener
exists following lines:Why it's not passing newly created envelope in transport with new stamps to the event
WorkerMessageRetriedEvent
?I mean:
This leads to issue that this
WorkerMessageRetriedEvent
not know any data about inserted row to DB as$retryEnvelope
is outdated aftersend()
call. I need to getTransportMessageIdStamp
by Doctrine for new inserted id, it stores in Envelope that returns by send, but current version not passing it further. It's impossible to do it in clear way here. Also if I have custom transport that adds some custom stamps that expected to be handled in thisWorkerMessageRetriedEvent
, it's is not possible currently.Do you have any suggestions? And is current implementation 100% correct and it's not planning to change this place?
Example
No response
The text was updated successfully, but these errors were encountered: