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:
co-authored by
Claude Sonnet 5.5
parent
e2c42dc268
commit
95e75d0101
Executable
+27
@@ -0,0 +1,27 @@
|
||||
# Sourced by every scenario script. Needs Docker, the compose stack from ../docker-compose.yml, curl, python3.
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
export JAVA_HOME="${JDK25_HOME:-/tmp/tools/jdk-25.0.5.1+2}"
|
||||
export PATH="$JAVA_HOME/bin:$PATH"
|
||||
CONNECT=http://localhost:8083
|
||||
KT=/opt/kafka/bin
|
||||
|
||||
sql() { docker compose exec -T postgres psql -U demo -d shop -X -q -v ON_ERROR_STOP=1 "$@"; }
|
||||
sqlp() { sql -P pager=off "$@"; }
|
||||
|
||||
# kafka_consume <topic> [idle-timeout-ms] -> "partition|key|value" lines
|
||||
kafka_consume() {
|
||||
docker compose exec -T kafka $KT/kafka-console-consumer.sh --bootstrap-server kafka:19092 --topic "$1" \
|
||||
--from-beginning --timeout-ms "${2:-6000}" \
|
||||
--formatter-property print.partition=true --formatter-property print.key=true \
|
||||
--formatter-property key.separator='|' --formatter-property print.headers=false 2>/dev/null \
|
||||
| sed -e 's/^Partition:\([0-9]*\)|/\1|/'
|
||||
}
|
||||
|
||||
summarize() { python3 -I "$ROOT/scripts/summarize.py" "$@"; }
|
||||
|
||||
register() { # register <connector-json-file>
|
||||
curl -s -o /dev/null -w "register %{http_code}\n" -X POST -H 'Content-Type: application/json' --data @"$1" $CONNECT/connectors
|
||||
}
|
||||
connector_state() { curl -s $CONNECT/connectors/"$1"/status | python3 -I -c 'import json,sys; d=json.load(sys.stdin); print(d["connector"]["state"], [t["state"] for t in d["tasks"]])'; }
|
||||
wait_running() { for i in $(seq 1 60); do s=$(connector_state "$1" 2>/dev/null || true); case "$s" in "RUNNING ['RUNNING']") return 0;; esac; sleep 1; done; echo "connector $1 not running: $s"; return 1; }
|
||||
Reference in New Issue
Block a user