Skip to content

Docker-compose example for setting up debezium with cassandra using 1 data center and 3 nodes.

Notifications You must be signed in to change notification settings

cscetbon/debezium-cassandra

 
 

Repository files navigation

  1. Start containers
docker-compose up
  1. Initialize keyspace
docker-compose exec -d cassandra-seed /opt/cassandra/tools/bin/cassandra-stress write n=1 cl=one -mode native cql3 user=cassandra password=cassandra
docker-compose exec -d cassandra-seed cqlsh -e "ALTER TABLE keyspace1.standard1 with cdc=true"
  1. Start debezium
docker-compose exec cassandra-seed  sh start-debezium.sh; done

This can take some time as cassandra takes some time to start.

  1. Make changes
docker-compose exec cassandra-seed /opt/cassandra/tools/bin/cassandra-stress write n=5K cl=one -mode native cql3 user=cassandra password=cassandra
  1. Force commitlog to be pushed to cdc folder
docker-compose exec cassandra-seed nodetool flush
  1. Verify events on debezium logs
docker-compose exec cassandra-seed  cat debezium.stdout.log | grep -i "commit"
  1. Shut it down When you're done just run the command below to delete containers and the corresponding volumes
docker-compose down -v

About

Docker-compose example for setting up debezium with cassandra using 1 data center and 3 nodes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%