linkedin / li-apache-kafka-clients

li-apache-kafka-clients is a wrapper library for the Apache Kafka vanilla clients. It provides additional features such as large message support and auditing to the Java producer and consumer in the open source Apache Kafka.
BSD 2-Clause "Simplified" License
131 stars 52 forks source link

Add enableRecordHeader config in producer #184

Closed bgeng7 closed 4 years ago

bgeng7 commented 4 years ago

This PR adds enableRecordHeader config in producer. When it is true, producer will add a new field in the record header and skip segment serialization in MsgSplitter. The type(version) field in LMHeaderValue will be set to V3 as well, which means we will only use record header based LM support. By detecting the type(version) field in LMHeaderValue, consumer can choose if it should use segment deserialization in MsgAssembler. So we do not need to add this config in consumer side.