Impossible send null payload (tombstone) because interface Serializer do not allow return null
Hubbitus opened this issue · 1 comments
Hubbitus commented
Payload to send defined by serializer in the RdKafkaProducer::send:
$payload = $this->serializer->toString($message);
Where serializer is the instance of a class, implementing Enqueue\RdKafka\Serializer interface. There method toString has signature:
public function toString(RdKafkaMessage $message): string;
So, in my class, I just can't return null! Please change the return type to ?string
.
Using nulls
as payload
is common practice also known as tombstones.
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.