THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
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) }
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) }
modify parent ConnectRecord constructor , and expose headers accessor method.
Code Block public class SinkRecordConnectRecord { + public ConnectRecord(String topic, Integer kafkaPartition, Schema keySchema, Object key, Schema valueSchema, Object value, Long timestamp, Iterable<Header> headers) + public Headers headers() }
- add newRecord methods in Sink and Source to take headers parameter, with existing signature delgating to new signature, but left in for compatbility
Add
newRecord
abstract method toConnectRecord
and override implementations inSourceRecord
andSinkRecord
to take headers parameter, with existing signature delegating to new signature, but left in for compatibility.
Proposed Changes
Add a headers field Headers to shared ConnectRecord, in turn would be available in Source/SinkRecords
- Accessor methods of Headers headers() added ConnectRecord
- Add constructor(s) of Connect.Source/SinkRecord to allow passing in of an existing/pre-constructed headers via Iterable<Header>
- use case is Replication connectors able to copy headers.
- See above.
...