Class CloudPubSubSinkTask (1.0.0)

public class CloudPubSubSinkTask extends SinkTask

A SinkTask used by a CloudPubSubSinkConnector to write messages to Google Cloud Pub/Sub.

Inheritance

java.lang.Object > org.apache.kafka.connect.sink.SinkTask > CloudPubSubSinkTask

Constructors

CloudPubSubSinkTask()

public CloudPubSubSinkTask()

CloudPubSubSinkTask(Publisher publisher)

public CloudPubSubSinkTask(Publisher publisher)
Parameter
NameDescription
publishercom.google.cloud.pubsub.v1.Publisher

Methods

flush(Map<TopicPartition,OffsetAndMetadata> partitionOffsets)

public void flush(Map<TopicPartition,OffsetAndMetadata> partitionOffsets)
Parameter
NameDescription
partitionOffsetsMap<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata>
Overrides
org.apache.kafka.connect.sink.SinkTask.flush(java.util.Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata>)

put(Collection<SinkRecord> sinkRecords)

public void put(Collection<SinkRecord> sinkRecords)
Parameter
NameDescription
sinkRecordsCollection<org.apache.kafka.connect.sink.SinkRecord>
Overrides
org.apache.kafka.connect.sink.SinkTask.put(java.util.Collection<org.apache.kafka.connect.sink.SinkRecord>)

start(Map<String,String> props)

public void start(Map<String,String> props)
Parameter
NameDescription
propsMap<String,String>
Overrides
org.apache.kafka.connect.sink.SinkTask.start(java.util.Map<java.lang.String,java.lang.String>)

stop()

public void stop()
Overrides
org.apache.kafka.connect.sink.SinkTask.stop()

version()

public String version()
Returns
TypeDescription
String