How To

Prerequisites

  • Linux/Unix-like OS (x86 architecture)
  • Docker
  • docker-compose or just enable Docker Compose v2
  • jq for pretty formatting of JSON
  • Fork this Github repository

Deployment

  • Build Docker images using docker-compose
docker-compose build
  • Deploy services in detached mode (background)
docker-compose up -d
  • To check the progress of deployment, please use the following:
docker-compose ps

Kafka Connect

  • Validate status of deployed connectors by running the following command:
curl -XGET "http://localhost:8083/connectors?expand=status" | jq

ksqlDB

  • Once you deploy services, connect to ksqldb-cli
docker-compose exec ksqldb ksql http://ksqldb:8080
  • Make sure that you established connection with ksqlDB server and see the following Server Status: RUNNING
CLI v0.22.0, Server v0.22.0 located at http://ksqldb:8088
Server Status: RUNNING
  • By default, the ksqlDB is configured to consume messages from the latest offset. So, you need to run the following command to get messages from the beginning
SET 'auto.offset.reset'='earliest';

Stopping

  • To stop services use down command
docker-compose down