Closed alsar closed 4 years ago
After adding support for the Symfony serializer https://github.com/KonstantinCodes/messenger-kafka/pull/6 the component stopped working when using the PhpSerializer which is the default serializer when using Messenger.
PhpSerializer
Because the PhpSerializer doesn't add headers (because it doesn't need to) but the KafkaTransport requires the key to be set here.
headers
KafkaTransport
Could we add a check if $payload['headers'] doesn't exist (or if PhpSerializer is used)? In this case just set it to null.
$payload['headers']
Thank you @alsar I have pushed the change and added Tests.
After adding support for the Symfony serializer https://github.com/KonstantinCodes/messenger-kafka/pull/6 the component stopped working when using the
PhpSerializer
which is the default serializer when using Messenger.Because the
PhpSerializer
doesn't addheaders
(because it doesn't need to) but theKafkaTransport
requires the key to be set here.Could we add a check if
$payload['headers']
doesn't exist (or ifPhpSerializer
is used)? In this case just set it to null.