public class VerifiableSinkTask
extends org.apache.kafka.connect.sink.SinkTask
VerifiableSourceTask that consumes records and logs information about each to stdout. This
allows validation of processing of messages by sink tasks on distributed workers even in the face of worker restarts
and failures. This task relies on the offset management provided by the Kafka Connect framework and therefore can detect
bugs in its implementation.| Modifier and Type | Field and Description |
|---|---|
static String |
ID_CONFIG |
static String |
NAME_CONFIG |
| Constructor and Description |
|---|
VerifiableSinkTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
flush(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets) |
void |
put(Collection<org.apache.kafka.connect.sink.SinkRecord> records) |
void |
start(Map<String,String> props) |
void |
stop() |
String |
version() |
public static final String NAME_CONFIG
public static final String ID_CONFIG
public String version()
public void start(Map<String,String> props)
start in interface org.apache.kafka.connect.connector.Taskstart in class org.apache.kafka.connect.sink.SinkTaskpublic void put(Collection<org.apache.kafka.connect.sink.SinkRecord> records)
put in class org.apache.kafka.connect.sink.SinkTaskpublic void flush(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets)
flush in class org.apache.kafka.connect.sink.SinkTaskpublic void stop()
stop in interface org.apache.kafka.connect.connector.Taskstop in class org.apache.kafka.connect.sink.SinkTask