Class CloudPubSubSourceConnector (0.1.1)

public class CloudPubSubSourceConnector extends SourceConnector

A SourceConnector that writes messages to a specific topic in Apache Kafka.

Inheritance

java.lang.Object > org.apache.kafka.connect.connector.Connector > org.apache.kafka.connect.source.SourceConnector > CloudPubSubSourceConnector

Static Fields

CPS_MAKE_ORDERING_KEY_ATTRIBUTE

public static final String CPS_MAKE_ORDERING_KEY_ATTRIBUTE
Field Value
TypeDescription
String

CPS_MAX_BATCH_SIZE_CONFIG

public static final String CPS_MAX_BATCH_SIZE_CONFIG
Field Value
TypeDescription
String

CPS_STREAMING_PULL_ENABLED

public static final String CPS_STREAMING_PULL_ENABLED
Field Value
TypeDescription
String

CPS_STREAMING_PULL_FLOW_CONTROL_BYTES

public static final String CPS_STREAMING_PULL_FLOW_CONTROL_BYTES
Field Value
TypeDescription
String

CPS_STREAMING_PULL_FLOW_CONTROL_MESSAGES

public static final String CPS_STREAMING_PULL_FLOW_CONTROL_MESSAGES
Field Value
TypeDescription
String

CPS_STREAMING_PULL_MAX_ACK_EXTENSION_MS

public static final String CPS_STREAMING_PULL_MAX_ACK_EXTENSION_MS
Field Value
TypeDescription
String

CPS_STREAMING_PULL_MAX_MS_PER_ACK_EXTENSION

public static final String CPS_STREAMING_PULL_MAX_MS_PER_ACK_EXTENSION
Field Value
TypeDescription
String

CPS_STREAMING_PULL_PARALLEL_STREAMS

public static final String CPS_STREAMING_PULL_PARALLEL_STREAMS
Field Value
TypeDescription
String

CPS_SUBSCRIPTION_CONFIG

public static final String CPS_SUBSCRIPTION_CONFIG
Field Value
TypeDescription
String

DEFAULT_CPS_MAX_BATCH_SIZE

public static final int DEFAULT_CPS_MAX_BATCH_SIZE
Field Value
TypeDescription
int

DEFAULT_KAFKA_PARTITIONS

public static final int DEFAULT_KAFKA_PARTITIONS
Field Value
TypeDescription
int

DEFAULT_KAFKA_PARTITION_SCHEME

public static final String DEFAULT_KAFKA_PARTITION_SCHEME
Field Value
TypeDescription
String

KAFKA_MESSAGE_KEY_CONFIG

public static final String KAFKA_MESSAGE_KEY_CONFIG
Field Value
TypeDescription
String

KAFKA_MESSAGE_TIMESTAMP_CONFIG

public static final String KAFKA_MESSAGE_TIMESTAMP_CONFIG
Field Value
TypeDescription
String

KAFKA_PARTITIONS_CONFIG

public static final String KAFKA_PARTITIONS_CONFIG
Field Value
TypeDescription
String

KAFKA_PARTITION_SCHEME_CONFIG

public static final String KAFKA_PARTITION_SCHEME_CONFIG
Field Value
TypeDescription
String

KAFKA_TOPIC_CONFIG

public static final String KAFKA_TOPIC_CONFIG
Field Value
TypeDescription
String

USE_KAFKA_HEADERS

public static final String USE_KAFKA_HEADERS
Field Value
TypeDescription
String

Constructors

CloudPubSubSourceConnector()

public CloudPubSubSourceConnector()

Methods

config()

public ConfigDef config()
Returns
TypeDescription
org.apache.kafka.common.config.ConfigDef
Overrides
org.apache.kafka.connect.connector.Connector.config()

start(Map<String,String> props)

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

stop()

public void stop()
Overrides
org.apache.kafka.connect.connector.Connector.stop()

taskClass()

public Class<? extends Task> taskClass()
Returns
TypeDescription
Class<? extends org.apache.kafka.connect.connector.Task>
Overrides
org.apache.kafka.connect.connector.Connector.taskClass()

taskConfigs(int maxTasks)

public List<Map<String,String>> taskConfigs(int maxTasks)
Parameter
NameDescription
maxTasksint
Returns
TypeDescription
List<Map<String,String>>
Overrides
org.apache.kafka.connect.connector.Connector.taskConfigs(int)

verifySubscription(String cpsProject, String cpsSubscription, CredentialsProvider credentialsProvider)

public void verifySubscription(String cpsProject, String cpsSubscription, CredentialsProvider credentialsProvider)

Check whether the user provided Cloud Pub/Sub subscription name specified by #CPS_SUBSCRIPTION_CONFIG exists or not.

Parameters
NameDescription
cpsProjectString
cpsSubscriptionString
credentialsProviderCredentialsProvider

version()

public String version()
Returns
TypeDescription
String