sroze / messenger-enqueue-transport

Uses Enqueue with Symfony's Messenger component.
MIT License
191 stars 54 forks source link

Issue with multiple senders - enveloping same message more than once #39

Closed cgonser closed 5 years ago

cgonser commented 5 years ago

I have multiple senders configured and everything was working fine until I updated to the latest messenger version.

After some debugging, I realized that the message is being enveloped more than once here.

I also noticed that the $message variable gets redefined here - it was originally an Envelope instance containing my original message under the message parameter and it becomes an instance of \Interop\Amqp\Impl\AmqpMessage, which gets enveloped and returned in the end of this method.

It seems that the issue also started after this change on the MiddlewareInterface, as the $envelope variable now gets redefined after each iteration.

ogizanagi commented 5 years ago

See #43