Jobcloud\Kafka\Message\KafkaConsumerMessage right now has this signature:
public function __construct(
string $topicName,
int $partition,
int $offset,
int $timestamp,
$key,
$body,
?array $headers
) {
Is there any reason why headers is nullable? What are the use cases for null value?
I see that headers are casting to array right now:
return new KafkaConsumerMessage(
(string) $message->topic_name,
(int) $message->partition,
(int) $message->offset,
(int) $message->timestamp,
$message->key,
$message->payload,
(array) $message->headers
);