Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Messenger] WorkerMessageRetriedEvent filled with not actual Envelope #52914

Copy link
Copy link
Closed
@daffoxdev

Description

@daffoxdev
Issue body actions

Description

Hi!

In Symfony\Component\Messenger\EventListener\SendFailedMessageForRetryListener exists following lines:

// re-send the message for retry
$this->getSenderForTransport($event->getReceiverName())->send($retryEnvelope);

$this->eventDispatcher?->dispatch(new WorkerMessageRetriedEvent($retryEnvelope, $event->getReceiverName()));

Why it's not passing newly created envelope in transport with new stamps to the event WorkerMessageRetriedEvent?
I mean:

// re-send the message for retry
$newEnvelope = $this->getSenderForTransport($event->getReceiverName())->send($retryEnvelope);

$this->eventDispatcher?->dispatch(new WorkerMessageRetriedEvent($newEnvelope, $event->getReceiverName()));

This leads to issue that this WorkerMessageRetriedEvent not know any data about inserted row to DB as $retryEnvelope is outdated after send() call. I need to get TransportMessageIdStamp 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 this WorkerMessageRetriedEvent, 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.