Class CloudPubSubSourceTask (1.2.0)

public class CloudPubSubSourceTask extends SourceTask

A SourceTask used by a CloudPubSubSourceConnector to write messages to Apache Kafka. Due to at-last-once semantics in Google Cloud Pub/Sub duplicates in Kafka are possible.

Inheritance

java.lang.Object > org.apache.kafka.connect.source.SourceTask > CloudPubSubSourceTask

Constructors

CloudPubSubSourceTask()

public CloudPubSubSourceTask()

CloudPubSubSourceTask(CloudPubSubSubscriber subscriber)

public CloudPubSubSourceTask(CloudPubSubSubscriber subscriber)
Parameter
NameDescription
subscriberCloudPubSubSubscriber

Methods

commitRecord(SourceRecord record)

public void commitRecord(SourceRecord record)
Parameter
NameDescription
recordorg.apache.kafka.connect.source.SourceRecord
Overrides
org.apache.kafka.connect.source.SourceTask.commitRecord(org.apache.kafka.connect.source.SourceRecord)

poll()

public List<SourceRecord> poll()
Returns
TypeDescription
List<org.apache.kafka.connect.source.SourceRecord>
Overrides
org.apache.kafka.connect.source.SourceTask.poll()
Exceptions
TypeDescription
InterruptedException

start(Map<String,String> props)

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

stop()

public void stop()
Overrides
org.apache.kafka.connect.source.SourceTask.stop()

version()

public String version()
Returns
TypeDescription
String