Skip to content

Neven1234/database-replication-using-Kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Database Replication using Apache Kafka

Table of Contents

Features

  • Real-time replication between two databases.
  • Uses Apache Kafka for change data capture.
  • SQL Server Change Tracking enabled for efficient change detection.

Prerequisites

  • SQL Server with Change Tracking enabled.
  • Apache Kafka and Zookeeper installed.

Setup

Install and Setup Kafka

Download and install Kafka from the Apache Kafka website.

Start Zookeeper

Start Zookeeper using the following command:

.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties.

Start Kafka Server

.\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 --bootstr

Start Kafka using this command:

.\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 SQL Server Change Tracking

Enable change tracking on your SQL Server

Usage

Send data to Kafka using Kafka producers. Receive data from Kafka consumers and apply changes to the second database.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages