Skip to content

[Messenger] Dispatching the message inside a handler causes a socket error sometimes #42825

@vuras

Description

@vuras

Symfony version(s) affected: 5.3.6

Description
Hello,

I have a system that needs to dispatch message after handling another message and sometimes not every time I get an error: Library error: a socket error occurred when messenger is trying to dispatch it. After throwing the exception message that was handled is being marked as failed and is retried which is spamming my database because everything was handled successfully up until the messenger trying to dispatch a message after successfully handling it.
I tried to play with AMQP options but with no success. Is it a bug or am I missing something? Maybe someone has any suggestions on how to workaround it?

How to reproduce
Dispatch a message inside a handler.

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