KonstantinCodes / messenger-kafka

Simple Kafka transport for Symfony Messenger.
MIT License
84 stars 35 forks source link

[ErrorException] Notice: Undefined property: RdKafka\Message::$headers #37

Closed fractalzombie closed 2 years ago

fractalzombie commented 2 years ago

Fix headers in KafkaReceiver.php on line 64. This issue can be reproduced if you use your package on one side and srooze enqueue on other side.

This happens because other libraries add their headers to payload and decodes in serializer and when i receive message on another side with your package it can't unpack because no headers found in object.

It fixes, because you use declare(strict_types=1): [ErrorException]
Notice: Undefined property: RdKafka\Message::$headers

And here is the fix: https://github.com/KonstantinCodes/messenger-kafka/pull/38

It would be great if you accept PR and Tag a new version because we have stuck with this issue.

KonstantinCodes commented 2 years ago

Thanks for fixing this issue!