Building a Custom Kafka Connect Connector

In this article, we will learn how to customize, build, and deploy a Kafka Connect connector in Landoop’s open-source UI tools. Landoop provides an Apache Kafka docker image for developers, and it comes with a number of source and sink connectors to a wide variety of data sources and sinks. FileStreamSourceConnector is a simple file connector that continuously tails a local file and publishes each line into the configured Kafka topic. Although this connector is not meant for production use, owing to its simplicity, we’ll use it to demonstrate how to customize an open source connector to meet our particular needs, build it, deploy it in Landoop’s docker image and make use of it.

Need for Customization

The FileStreamSourceConnector does not include a key in the message that it publishes to the Kafka topic. In the absence of key, lines are sent to multiple partitions of the Kafka topic with round-robin strategy. A relevant code snippet from the FileStreamSourceConnector source code is shown below. https://goo.gl/vv3Aar #DataIntegration #ML

Subscribe To Newsletter

Sign up for my newsletter and get the latest technology news

2019 © Craig Brown PhD. All rights reserved.