Skip to content

Latest commit

 

History

History
73 lines (50 loc) · 1.45 KB

README.md

File metadata and controls

73 lines (50 loc) · 1.45 KB

Change Data Capture with Debezium and Kafka

Change Data Capture with Debezium and Kafka based on Docker

Getting Started

Installing

  1. Clone this repository anywhere on your machine:
$ git clone https://github.com/snlangsuan/demo-cdc-debezium-kafka.git
  1. Run docker compose build
  $ docker-compose up -d

Usage

  1. Access to MariaDB
$ docker-compose -f docker-compose.yml exec mariadb \
    bash -c 'mysql -uroot -p$MYSQL_ROOT_PASSWORD inventory'
  1. Register a connector to monitor the database
$ curl -i -X POST \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json' \
    -d @register-mysql.json \
    http://localhost:8083/connectors
  1. Display list of connectors
$ curl http://localhost:8083/connectors
  1. Get a connector by name
$ curl http://localhost:8083/connectors/inventory-connector
  1. Delete a connector by name
$ curl -X DELETE http://localhost:8083/connectors/inventory-connector
  1. Get a list of topics
$ docker-compose run --rm kafka list-topics
  1. Watch topic by topic name
$ docker-compose run --rm kafka watch-topic \
    -a -k 'dbserver1.inventory.customers'

Acknowledgments