CDC Debezium example based on Docker.
> [Git](https://git-scm.com/downloads)
> [Docker](https://www.docker.com/products/docker) >= 17.12
- Clone this repository anywhere on your machine:
git clone git@github.com:gobliggg/cdc-debezium-example.git
- Run docker compose build
docker-compose up -d --build
- Register a connector to monitor the database
curl --request POST \
--url http://127.0.0.1:8083/connectors \
--header 'content-type: application/json' \
--data '{
"name": "inventory-connector",
"config": {
"connector.class": "io.debezium.connector.mysql.MySqlConnector",
"tasks.max": "1",
"database.hostname": "mysql",
"database.port": "3306",
"database.user": "root",
"database.password": "secret",
"database.server.id": "184054",
"database.server.name": "dbserver1",
"database.whitelist": "inventory",
"database.history.kafka.bootstrap.servers": "kafka:9092",
"database.history.kafka.topic": "dbhistory.inventory"
}
}'
- Display list of connectors
curl --request GET \
--url http://127.0.0.1:8083/connectors
- Get a connector by name
curl --request GET \
--url http://127.0.0.1:8083/connectors/inventory-connector
- Get a list of topics
docker-compose run --rm kafka list-topics
- Watch topic by topic name
docker-compose run --rm kafka watch-topic -a -k `topic name`
- Fork it (https://github.com/yourname/yourproject/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
TBS