Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 931 Bytes

README.md

File metadata and controls

37 lines (28 loc) · 931 Bytes

go-cdc

This repository demonstrates how to use Change Data Capture (CDC) with Debezium, Kafka, and Go. Inspired by this video, thanks to Eko Kurniawan Khannedy 🎉.

Prerequisites

  • Docker
  • Docker Compose
  • Go

Setup

  1. Clone this repository:

    git clone https://github.com/carakawedhatama/go-cdc.git
    cd go-cdc
  2. Start the services using Docker Compose:

    docker-compose up -d
  3. Run the Go application:

    go mod tidy
    go run main.go

How it works?

  • MariaDB is set up with a sample database and table.
  • Debezium captures changes from the MariaDB transaction log and sends them to Kafka.
  • The Go-CDC application consumes the changes from the Kafka topic and prints them.

License

This project is licensed under the MIT License.