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 > CloudPubSubSourceConnectorStatic Fields
CPS_MAKE_ORDERING_KEY_ATTRIBUTE
public static final String CPS_MAKE_ORDERING_KEY_ATTRIBUTE
Field Value | |
---|---|
Type | Description |
String |
CPS_MAX_BATCH_SIZE_CONFIG
public static final String CPS_MAX_BATCH_SIZE_CONFIG
Field Value | |
---|---|
Type | Description |
String |
CPS_STREAMING_PULL_ENABLED
public static final String CPS_STREAMING_PULL_ENABLED
Field Value | |
---|---|
Type | Description |
String |
CPS_STREAMING_PULL_FLOW_CONTROL_BYTES
public static final String CPS_STREAMING_PULL_FLOW_CONTROL_BYTES
Field Value | |
---|---|
Type | Description |
String |
CPS_STREAMING_PULL_FLOW_CONTROL_MESSAGES
public static final String CPS_STREAMING_PULL_FLOW_CONTROL_MESSAGES
Field Value | |
---|---|
Type | Description |
String |
CPS_STREAMING_PULL_MAX_ACK_EXTENSION_MS
public static final String CPS_STREAMING_PULL_MAX_ACK_EXTENSION_MS
Field Value | |
---|---|
Type | Description |
String |
CPS_STREAMING_PULL_MAX_MS_PER_ACK_EXTENSION
public static final String CPS_STREAMING_PULL_MAX_MS_PER_ACK_EXTENSION
Field Value | |
---|---|
Type | Description |
String |
CPS_STREAMING_PULL_PARALLEL_STREAMS
public static final String CPS_STREAMING_PULL_PARALLEL_STREAMS
Field Value | |
---|---|
Type | Description |
String |
CPS_SUBSCRIPTION_CONFIG
public static final String CPS_SUBSCRIPTION_CONFIG
Field Value | |
---|---|
Type | Description |
String |
DEFAULT_CPS_MAX_BATCH_SIZE
public static final int DEFAULT_CPS_MAX_BATCH_SIZE
Field Value | |
---|---|
Type | Description |
int |
DEFAULT_KAFKA_PARTITIONS
public static final int DEFAULT_KAFKA_PARTITIONS
Field Value | |
---|---|
Type | Description |
int |
DEFAULT_KAFKA_PARTITION_SCHEME
public static final String DEFAULT_KAFKA_PARTITION_SCHEME
Field Value | |
---|---|
Type | Description |
String |
KAFKA_MESSAGE_KEY_CONFIG
public static final String KAFKA_MESSAGE_KEY_CONFIG
Field Value | |
---|---|
Type | Description |
String |
KAFKA_MESSAGE_TIMESTAMP_CONFIG
public static final String KAFKA_MESSAGE_TIMESTAMP_CONFIG
Field Value | |
---|---|
Type | Description |
String |
KAFKA_PARTITIONS_CONFIG
public static final String KAFKA_PARTITIONS_CONFIG
Field Value | |
---|---|
Type | Description |
String |
KAFKA_PARTITION_SCHEME_CONFIG
public static final String KAFKA_PARTITION_SCHEME_CONFIG
Field Value | |
---|---|
Type | Description |
String |
KAFKA_TOPIC_CONFIG
public static final String KAFKA_TOPIC_CONFIG
Field Value | |
---|---|
Type | Description |
String |
USE_KAFKA_HEADERS
public static final String USE_KAFKA_HEADERS
Field Value | |
---|---|
Type | Description |
String |
Constructors
CloudPubSubSourceConnector()
public CloudPubSubSourceConnector()
Methods
config()
public ConfigDef config()
Returns | |
---|---|
Type | Description |
org.apache.kafka.common.config.ConfigDef |
org.apache.kafka.connect.connector.Connector.config()
start(Map<String,String> props)
public void start(Map<String,String> props)
Parameter | |
---|---|
Name | Description |
props | Map<String,String> |
org.apache.kafka.connect.connector.Connector.start(java.util.Map<java.lang.String,java.lang.String>)
stop()
public void stop()
org.apache.kafka.connect.connector.Connector.stop()
taskClass()
public Class<? extends Task> taskClass()
Returns | |
---|---|
Type | Description |
Class<? extends org.apache.kafka.connect.connector.Task> |
org.apache.kafka.connect.connector.Connector.taskClass()
taskConfigs(int maxTasks)
public List<Map<String,String>> taskConfigs(int maxTasks)
Parameter | |
---|---|
Name | Description |
maxTasks | int |
Returns | |
---|---|
Type | Description |
List<Map<String,String>> |
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 | |
---|---|
Name | Description |
cpsProject | String |
cpsSubscription | String |
credentialsProvider | CredentialsProvider |
version()
public String version()
Returns | |
---|---|
Type | Description |
String |