This repository contains a sample project that can be used to start off your own sink connector for Kafka Connect.
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
After building the connector, you can try it by using the Docker-based installation from this repository.
Start the environment with the following command:
docker-compose up
Wait until all containers are up so you can start the testing.
Open a terminal to execute the following command:
curl -X POST -H "Content-Type:application/json" -d @connector-config.json http://localhost:8083/connectors
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