Luca Burgazzoli created KAFKA-12391:
---------------------------------------

             Summary: Add an option to store arbitrary metadata to a 
SourceRecord
                 Key: KAFKA-12391
                 URL: https://issues.apache.org/jira/browse/KAFKA-12391
             Project: Kafka
          Issue Type: Improvement
          Components: KafkaConnect
            Reporter: Luca Burgazzoli


When writing Source Connectors for Kafka, it may be required to perform some 
additional house cleaning when an record has been acknowledged by the Kafka 
broker and as today, it is possible to set up an hook by overriding 
SourceTask.commitRecord(SourceRecord).

This works fine in most of the cases but to make it easy for the source 
connector to perform it's internal house keeping, it would be nice to have an 
option to set some additional metadata to the SourceRecord without having 
impacts to the Record sent to the Kafka Broker, something like:

{code:java}
class SourceRecord {
    public SourceRecord(
        ...,
        Map<String, ?> attributes) {
        ...
        this.attributes = attributes;
    }

    Map<String, ?> attributes() { 
        return attributes;
    }
{code}





--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to