Skip to content

Messenger doctrine transport does not decode message headers properly  #31916

Closed
@ojrzenski

Description

@ojrzenski

Symfony version(s) affected: 4.3.x

Description
Symfony\Component\Messenger\Transport\Doctrine\Connection does not json_encode headers when using ::all() and ::find() methods of DoctrineReceiver.

This leads to MessageDecodingFailedException when using Symfony\Component\Messenger\Transport\Serialization\Serializer

How to reproduce

  • use doctrine transport
  • use messenger.transport.symfony_serializer
  • fetch envelopes with ListableReceiverInterface methods

Possible Solution

  • separate message type from headers in table schema
  • or simply json_encode headers when using find() and all()

Additional context
PhpSerializer would do the work, but it fails on serializing of Closure object.
This issue occured when trying to transport Sentry events with message bus.

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