Implement Debezium Standalone Server without Apache Kafka, using Redis as infrastructure (Redis Stream) to push CDC event.
In this example includes:
-
Standalone worker
-
Prebuild docker-compose to demo multi-worker (Using atomic SetNX of Redis to deduplicate cdc event).
Java 17
Docker
Docker-compose
This multi-worker demo using Postgres.
Start demo
docker-compose -f demo.yml up -d
Connect to Postgres and create some data
create table customers
(
id serial primary key not null,
name varchar(255) not null
);
Create 2 customers
insert into customers (name)
values ('First customer'),
('Second customer');
Result
Go to Redisinsight browser tab -> Connect to Redis -> Redis Stream to check.