- Real-time replication between two databases.
- Uses Apache Kafka for change data capture.
- SQL Server Change Tracking enabled for efficient change detection.
- SQL Server with Change Tracking enabled.
- Apache Kafka and Zookeeper installed.
Download and install Kafka from the Apache Kafka website.
Start Zookeeper using the following command:
.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties.
.\bin\windows\kafka-server-start.bat .\config\server.properties
Create a Kafka topic named test-topic:
.\bin\windows\kafka-topics.bat --create --topic test-topic --bootstr
.\bin\windows\kafka-server-start.bat .\config\server.properties Create a Kafka Topic Create a Kafka topic named test-topic: .\bin\windows\kafka-topics.bat --create --topic test-topic --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1
Enable change tracking on your SQL Server
Send data to Kafka using Kafka producers. Receive data from Kafka consumers and apply changes to the second database.