Description
Detailed in KIP-502
The key class in a Sink Connector is the `SinkTask` implementation. The `SinkTask.put(...)` method delivers the records from the KafkaConsumer to the Connector-specific code through this entrypoint, and its current abstract class specifies:
public abstract void put(Collection<SinkRecord> records);
Usually, the implementer will use a for-each loop to iterate through the records one by one and act on them. There is only one caller, WorkerSinkTask which always passes an ArrayList.
There are two shortcomings with this signature:
- The Connector implementation is not provide with any ordering guarantees of Records.
- The decision values giving flexibility to the caller of the method over the implementer of the method.