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] Worker fail in loop on handling empty message #30649

Copy link
Copy link
Closed
@SukachVitally

Description

@SukachVitally
Issue body actions

Symfony version(s) affected: 4.2

Description
Messenger worker fail after handling message with empty body (or headers) and restart this process in loop. Other messages in queue become blocked.
No way to catch this exception in middleware or handler.

How to reproduce

  1. Start worker php bin/console messenger:consume-messages some_transport.
  2. Add message with empty headers to queue.
  3. Worker fail and restart handling invalid message in loop.

Possible Solution

  1. Add additional catch block for Symfony\Component\Messenger\Exception\InvalidArgumentException to reject message.
  2. Add error handler for serializer in Symfony\Component\Messenger\Transport\AmqpExt\AmqpReceiver

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

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