Hi everyone,
I'm using SmallRye Reactive Messaging with the Kafka connector and I'm trying to keep my build-time dependencies as minimal and implementation-agnostic as possible.
In my use case, I need to attach headers using OutgoingKafkaRecordMetadata (and similarly read them with IncomingKafkaRecordMetadata). However, to create headers I currently need to instantiate RecordHeader, which comes from the kafka-clients artifact:
org.apache.kafka.common.header.internals.RecordHeader
This forces me to depend on the full kafka-clients.jar at build time, even though I would prefer to:
So my question is:
Is there a clean or recommended way to use OutgoingKafkaRecordMetadata / IncomingKafkaRecordMetadata (especially for headers) without depending directly on the full kafka-clients artifact, just for RecordHeader?
Thanks in advance for any guidance!
Skander