Closed Steveb-p closed 5 years ago
Looks like it's fixed on master. But not yet released (db82dd6dfb9e09dd57cee6c81895b190ad5d3409).
Actually, messages is also sent to another route when '*'
is matched and route has a different sender. I don't know if it should be considered a Messenger bug, what do you guys think?
Is it better now that the fix has been released? Not sure about the *
routing part :)
@weaverryan Our testing when using 0.9 shown that the issue is no more :)
Initially thought it's an issue with Messenger itself.
I'm using enqueue with Kafka and messenger adapter to send messages to external services. Here's my messenger.yaml:
Notice:
send_and_handle
are only for debugging atm.Related packages (and Symfony 4.2):
And enqueue.yaml:
I'm emitting messages using:
This causes messages to be received twice. Once for amqp and once for view_events transports. When looking for the reason why this is happening I added
send_and_handle
settings and realized:SendMessageMiddleware
containsRdKafkaMessage
instead of expectedDisplayNotification
.Looking through
SenderInterface
I noticed that it's implementationQueueInteropTransport
expects to receive and return anEnvelope
. However, envelope returned is a new instance of Envelope wrapping previous Envelope as message. I believe it should be the previous instance instead?send
method exerpt below:When
$originalMessage
is returned, Messenger component behaves as expected: send message only once and handlers receive expected objects.I'll create pull request in a moment, but do you see any issues with this change? Will it break anything in enqueue itself?