Kafka messages can contain headers. I've seen some other packages had issues allowing headers to be sent, so I guess they can be introduced to Kafka package as well?
So far I've noticed that changes would be then required to \Enqueue\RdKafka\RdKafkaConsumer::doReceive and \Enqueue\RdKafka\RdKafkaProducer::send would need to switch between produce and producev Kafka producer methods. Do you recall any other places that would need adjustments?
EDIT: Noticed that there is a JsonSerializer that is responsible for encoding and decoding messages. While I would personally leave properties and body and still serialize them, I believe we could skip serialization for headers by putting them properly into producev. This could potentially allow consumers to skip messages when they are not interested in them, without going through deserialization process?
Kafka messages can contain headers. I've seen some other packages had issues allowing headers to be sent, so I guess they can be introduced to Kafka package as well?
So far I've noticed that changes would be then required to
\Enqueue\RdKafka\RdKafkaConsumer::doReceiveand\Enqueue\RdKafka\RdKafkaProducer::sendwould need to switch betweenproduceandproducevKafka producer methods. Do you recall any other places that would need adjustments?EDIT: Noticed that there is a
JsonSerializerthat is responsible for encoding and decoding messages. While I would personally leavepropertiesandbodyand still serialize them, I believe we could skip serialization for headers by putting them properly intoproducev. This could potentially allow consumers to skip messages when they are not interested in them, without going through deserialization process?