Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This KIP has the following public interface changes:

  1. Add new constructor to Source Record

    Code Block
    public class SourceRecord {
         
    +	public SourceRecord(Map<String, ?> sourcePartition, Map<String, ?> sourceOffset,
                        String topic, Integer partition,
                        Schema keySchema, Object key,
                        Schema valueSchema, Object value,
                        Long timestamp, Iterable<Header> headers)
       
    }
     
  2. Add new constructor to Sink Record

    Code Block
    public class SinkRecord {
    +   public SinkRecord(String topic, int partition, Schema keySchema, Object key, Schema valueSchema, Object value, long kafkaOffset,
                      Long timestamp, TimestampType timestampType, Iterable<Header> headers)
       
    }
     
  3. modify parent ConnectRecord constructor , and expose headers accessor method.

    Code Block
    public class SinkRecord {
     
    +   public ConnectRecord(String topic, Integer kafkaPartition,
                         Schema keySchema, Object key,
                         Schema valueSchema, Object value,
                         Long timestamp, Iterable<Header> headers) 
    +   public Headers headers()
    
      
    }
     

    Changes needed, will piggyback onto V3 of ProduceRequest and V4 of FetchRequest which were introduced in KIP-98

  1. The serialisation of the [String, byte[]] header array will on the wire using a strict format
  2. Each headers value will be custom serialisable by the interceptors/plugins that use the header.

...