Debezium Postgres CDC
This module provides a Debezium connector for Postgres. It is based on the Debezium Postgres connector and uses confluent zookeeper, broker, schema registry and rest proxy.
Prerequisites
- Docker
 - Docker Compose
 
Running the Stack
- Run 
docker-compose upto start the connector - Run 
docker-compose downto stop the connector - Run 
docker-compose logs -fto view the logs - Run 
docker-compose exec postgres bashto access the postgres container - Run 
docker-compose exec broker bashto access the kafka container 
Registering the connector
- Run 
curl -X POST -H "Content-Type: application/json" -d @connector.json http://localhost:8083/connectors 
Testing the connector
- Run 
docker-compose exec postgres bashto access the postgres container - Run 
psql -U postgresto access the postgres database 
Viewing the data
- Run 
docker-compose exec broker bashto access the kafka container - Run 
kafka-console-consumer --bootstrap-server broker:9092 --topic postgres.public.movies --from-beginning 
Schema Registry
Viewing the schema
- Run 
curl -X GET http://localhost:8081/subjects/postgres.public.movies/versions/1 
Registering the schema
- Run 
curl -X POST -H "Content-Type: application/json" -d @schema.json http://localhost:8081/subjects/postgres.public.movies/versions 
More info
- more information on the website Tips-Of-Mine
 
