GitHub user rhauch opened a pull request:
https://github.com/apache/kafka/pull/4077
KAFKA-5142: Added support for record headers, reusing Kafka client's
interfaces
*This is still a work in progress and should not be merged.*
This is a proposed PR that implements most of
[KIP-145](https://cwiki.apache.org/confluence/display/KAFKA/KIP-145+-+Expose+Record+Headers+in+Kafka+Connect)
but with some changes. The Kafka client library's `Headers` and `Header`
interfaces are used directly so as to minimize the overhead of converting
instances to a Connect-specific object. However, a new `ConnectHeaders` class
is proposed to provide a fluent builder for easily constructing headers either
in source connectors or SMTs that need to add/remove/modify headers, and a
reader utility component for reading header values and converting to primitives.
Note that KIP-145 is still undergoing discussions, so this is provided
merely as one possible approach.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rhauch/kafka kafka-5142
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/4077.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #4077
----
commit 5f31191af94e2a324a694bc99e4639d968389ff2
Author: Randall Hauch <[email protected]>
Date: 2017-10-16T22:59:50Z
KAFKA-5142: Added support for record headers, reusing Kafka client's
interfaces
----
---