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
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# The change-event envelope: snapshot reads, then insert, update, delete (and the tombstone) with the default replica identity.
set -eu
. "$(dirname "$0")/lib.sh"
OUT=output/02-event-format.txt
mkdir -p output
{
echo "### Replica identity of orders (d = default, primary key only)"
sqlp -c "select relname, relreplident from pg_class where relname = 'orders'"
echo
echo "### Four statements, one transaction each"
sql -c "insert into orders values (3, 'meera', 'NEW', 999)"
sql -c "update orders set status = 'PAID' where id = 3"
sql -c "update orders set amount_cents = 1099 where id = 3"
sql -c "delete from orders where id = 3"
sleep 4
echo
echo "### Topic shop.public.orders in WAL order (p = partition). The two op=r records are the initial snapshot."
kafka_consume shop.public.orders 6000 | summarize --sort-lsn
echo
echo "### The raw insert envelope for id 3, exactly as Kafka stores it (value, pretty-printed with jq)"
kafka_consume shop.public.orders 6000 | awk -F'|' '$2 == "{\"id\":3}" && $3 ~ /"op":"c"/ {print $3}' | jq .
} 2>&1 | tee "$OUT"