id: version-2.3.0-io-kafka title: Kafka Connector sidebar_label: Kafka Connector original_id: io-kafka

Source

The Kafka Source Connector is used to pull messages from Kafka topics and persist the messages to a Pulsar topic.

Source Configuration Options

NameRequiredDefaultDescription
bootstrapServerstruenullA list of host/port pairs to use for establishing the initial connection to the Kafka cluster.
groupIdtruenullA unique string that identifies the consumer group this consumer belongs to.
fetchMinBytesfalse1Minimum bytes expected for each fetch response.
autoCommitEnabledfalsetrueIf true, the consumer's offset will be periodically committed in the background. This committed offset will be used when the process fails as the position from which the new consumer will begin.
autoCommitIntervalMsfalse5000The frequency in milliseconds that the consumer offsets are auto-committed to Kafka if autoCommitEnabled is set to true.
heartbeatIntervalMsfalse3000The interval between heartbeats to the consumer when using Kafka's group management facilities.
sessionTimeoutMsfalse30000The timeout used to detect consumer failures when using Kafka's group management facility.
topictruenullTopic name to receive records from Kafka.
consumerConfigPropertiesfalsenullThe consumer config properties to be passed to Consumer. Note that other properties specified in the connector config file take precedence over this config.
keyDeserializationClassfalseorg.apache.kafka.common.serialization.StringDeserializerDeserializer class for key that implements the org.apache.kafka.common.serialization.Deserializer interface.
valueDeserializationClassfalseorg.apache.kafka.common.serialization.ByteArrayDeserializerDeserializer class for value that implements the org.apache.kafka.common.serialization.Deserializer interface.

Sink

The Kafka Sink Connector is used to pull messages from Pulsar topics and persist the messages to a Kafka topic.

Sink Configuration Options

NameRequiredDefaultDescription
bootstrapServerstruenullA list of host/port pairs to use for establishing the initial connection to the Kafka cluster.
ackstruenullThe kafka producer acks mode.
batchSizefalse16384The kafka producer batch size.
maxRequestSizefalse1048576The maximum size of a request in bytes.
topictruenullTopic name to receive records from Kafka.
producerConfigPropertiesfalsenullThe producer config properties to be passed to Producer. Note that other properties specified in the connector config file take precedence over this config.
keySerializerClassfalseorg.apache.kafka.common.serialization.StringSerializerSerializer class for value that implements the org.apache.kafka.common.serialization.Serializer interface.
valueSerializerClassfalseorg.apache.kafka.common.serialization.ByteArraySerializerSerializer class for value that implements the org.apache.kafka.common.serialization.Serializer interface.