public void record(SinkRecord record) {
        if (consumer != null && record != null) {
            consumer.accept(record);
        }
        if (recordsRemainingLatch != null) {
            recordsRemainingLatch.countDown();
        }
        connectorHandle.record();
    }
Record a message arrival at the task and the connector overall.
connect/runtime/src/test/java/org/apache/kafka/connect/integration/TaskHandle.java