Skip to content

[Messenger] Redis Transport removes message from stream on rejection #36619

Closed
@Steveb-p

Description

@Steveb-p

Symfony version(s) affected: 5.0.7

Description
Redis Messenger transport deletes messages when rejecting, causing other consumers / applications to be unable to reach that message.

This is specifically because of the line:

$deleted = $this->connection->xdel($this->stream, [$id]) && $deleted;

which causes messages to be removed from the stream, instead of being acknowledged only by a particular consumer group.

This affects primarily cases where Messenger component is used to read/write with other, third party applications.

How to reproduce

  1. Create two transports with different consumer groups.
  2. Dispatch a message that cannot be handled properly, for example due to failing deserialization.
  3. Start consuming from both transports. Only one of consumers will pick up this message.

Possible Solution
Removing the delete command should suffice, but I'm not sure if it doesn't affect some other use cases.

Additional context


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