Photo by Dan Gold / Unsplash

Change Data Capture (CDC) with PostgreSQL and Debezium

Change Data Capture Aug 14, 2022

This post briefly documents the process of Change Data Capture (CDC) with PostgreSQL and Debezium open source tools.

Introduction

Change data capture (CDC) refers to the process of identifying and capturing changes made to data in a database and then delivering those changes in real-time to a downstream process or system

PostgreSQL, also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance.

Debezium is an open source distributed platform for change data capture.

Minimum Software Requirements

Getting Started

Setup

DB Configuration

14

CREATE TABLE STUDENT(id INTEGER PRIMARY KEY, name VARCHAR);

ALTER TABLE public.student REPLICA IDENTITY FULL;

SELECT * FROM STUDENT;

Setup debezium Connector

Tail kafka CDC topic

Add, Update, Delete Records in the Table and see it in the kafka topic.

INSERT INTO STUDENT(id,name) VALUES (1,'JOHN');
INSERT INTO STUDENT(id,name) VALUES (2,'JANE');

UPDATE STUDENT SET name='JOHNNY' WHERE ID=1;

Tags

Anantha Raju C

| Poetry | Music | Cinema | Books | Visual Art | Software Engineering |