Ingest data from Kafka to RudderStack using the Kafka sink connector.
3 minute read
This feature is in alpha as part of RudderStack’s Early Access Program, where we work with early users and customers to test new features and get feedback before making them generally available. Note that these features are functional but can change as we improve them.
Kafka is a distributed event streaming platform for building real-time data pipelines and applications at scale.
RudderStack lets you ingest data from Kafka in real-time by providing a Kafka sink connector. It integrates seamlessly with your existing Kafka cluster, minimizes setup time, and allows you to start leveraging your data faster.
Features
The Kafka source connector provides:
Seamless integration with your existing Kafka cluster, minimizing setup time
Real-time data streaming from Kafka to RudderStack, enabling you to make data-driven decisions quickly
Support for both JSON and Avro message formats
Note the following:
The RudderStack Kafka Sink Connector is released under the MIT License.
The Kafka connector supports both JSON and Avro message formats. You’ll need to create a rudderstack-kafka-connector-config.properties file with the appropriate configuration based on your message format.
# Change the following configration according to your setup
name=rudderstack-json-sink
tasks.max=1
topics=<YOUR_TOPIC>
rudder.data.plane.url=<DATA_PLANE_URL>
rudder.write.key=<WRITE_KEY>
# Keep the following configuration as it is
connector.class=com.rudderstack.kafka.connect.RudderstackSinkConnector
# Converter settings for key and value
key.converter=org.apache.kafka.connect.json.JsonConverter
value.converter=org.apache.kafka.connect.json.JsonConverter
# Disable schemas for key and value
key.converter.schemas.enable=false
value.converter.schemas.enable=false
# Change the following configration according to your setup
name=rudderstack-avro-sink
tasks.max=1
topics=<YOUR_TOPIC>
rudder.data.plane.url=<DATA_PLANE_URL>
rudder.write.key=<WRITE_KEY>
key.converter.schema.registry.url=http://localhost:8081
value.converter.schema.registry.url=http://localhost:8081
# Keep the following configuration as it is
connector.class=com.rudderstack.kafka.connect.RudderstackSinkConnector
# Converter settings for key and value
key.converter=io.confluent.connect.avro.AvroConverter
value.converter=io.confluent.connect.avro.AvroConverter
key.converter.schemas.enable=true
value.converter.schemas.enable=true
Replace <YOUR_TOPIC> with your Kafka topic name and <DATA_PLANE_URL>, and <WRITE_KEY> fields with the data plane URL and source write key obtained in the Setup section.
Usage
To start the connector, use the following commands:
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.