Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.4 KB

README.md

File metadata and controls

58 lines (36 loc) · 1.4 KB

Kafka Connect File Stream

This repository contains a sample project that can be used to start off your own sink connector for Kafka Connect.

Building the connector

The first thing you need to do to start using this connector is built it. To do that, you need to install the following dependencies:

After installing these dependencies, execute the following command:

mvn clean package

Trying the connector

After building the connector, you can try it by using the Docker-based installation from this repository.

1 - Starting the environment

Start the environment with the following command:

docker-compose up

Wait until all containers are up so you can start the testing.

2 - Install the connector

Open a terminal to execute the following command:

curl -X POST -H "Content-Type:application/json" -d @connector-config.json http://localhost:8083/connectors

3 - Check the operation

Open a terminal to execute the following command:

docker exec -it kafka kafka-console-producer --bootstrap-server localhost:19092 --topic some-topic

Now write some messages and sent to Kafka topic, after that open another tab on terminal and execute these commands:

docker exec -it kafka-connect bash
cat messages.txt

We are ready to write connectors 🚀