Add debezium-cdc module: Debezium 3.7.1 CDC from Postgres 18 to Kafka, Connect vs embedded engine vs outbox

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b5uEyg58znuchZ8C8i
This commit is contained in:
asmhatre
2026-11-29 13:36:01 +05:30
co-authored by Claude Sonnet 5.5
parent e2c42dc268
commit 95e75d0101
32 changed files with 1200 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
# Why an update has before=null, why a delete has placeholder values, and what REPLICA IDENTITY FULL changes.
set -eu
. "$(dirname "$0")/lib.sh"
OUT=output/03-replica-identity.txt
mkdir -p output
latest() { # latest <key-id> <n> : last n events for an order id, in WAL order
kafka_consume shop.public.orders 6000 | grep -F "|{\"id\":$1}|" | summarize --sort-lsn | tail -"$2"
}
{
sql -c "insert into orders values (4, 'dev', 'NEW', 500)"
echo "### REPLICA IDENTITY DEFAULT: update and delete of order 4"
sql -c "update orders set status = 'PAID' where id = 4"
sql -c "delete from orders where id = 4"
sleep 4
latest 4 4
echo
echo "### Switch the table to REPLICA IDENTITY FULL"
sql -c "alter table orders replica identity full"
sqlp -c "select relname, relreplident from pg_class where relname = 'orders'"
sql -c "insert into orders values (5, 'kiran', 'NEW', 700)"
sql -c "update orders set status = 'PAID' where id = 5"
sql -c "delete from orders where id = 5"
sleep 4
echo "### Same three statements for order 5"
latest 5 4
echo
echo "### Add a column while the connector is running; the next event carries it, no restart needed"
sql -c "alter table orders add column note text"
sql -c "update orders set note = 'gift wrap' where id = 1"
sleep 4
latest 1 1
} 2>&1 | tee "$OUT"