Skip to content

Instantly share code, notes, and snippets.

View yildirimabdullah's full-sized avatar

ABDULLAH YILDIRIM yildirimabdullah

View GitHub Profile
@yildirimabdullah
yildirimabdullah / debezium-installation.adoc
Created May 16, 2020 23:00 — forked from jpsoroulas/debezium-installation.adoc
Debezium installation procedure for PostgreSQL without docker

Debezium installation

# Make sure you are in the Kafka directory before running this command.
# For list all topics
bin/kafka-topics.sh --list --bootstrap-server localhost:9092
# For consume specific topic
bin/kafka-console-consumer.sh --bootstrap-server 127.0.0.1:9092 --from-beginning --topic debezium.public.persons | jq
INSERT INTO persons (id, firstname, lastname, email) VALUES (1,'Abdullah','Yıldırım','abdullah.yildirim@trendyol.com');
curl -i -X GET '127.0.0.1:8083/connectors/debezium-test-connector/status'
# Make sure you are in the Kafka directory before running this command.
bin/kafka-topics.sh --list --bootstrap-server localhost:9092
docker run -it --rm --name connect -p 8083:8083
-e CONFIG_STORAGE_TOPIC=debezium_connect_config
-e OFFSET_STORAGE_TOPIC=debezium_connect_offset
-e STATUS_STORAGE_TOPIC=debezium_connect_status
--link zookeeper:zookeeper
--link kafka:kafka
--link postgres:postgres debezium/connect:1.0
docker run -it --rm --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=password -e POSTGRES_USER=user -e POSTGRES_DB=debezium debezium/postgres:11
docker run -it --rm --name kafka -p 9092:9092 --link zookeeper:zookeeper debezium/kafka:1.0
docker run -it --rm --name zookeeper -p 2181:2181 -p 2888:2888 -p 3888:3888 debezium/zookeeper:1.0
curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" 127.0.0.1:8083/connectors/ -d '
{ "name": "debezium-test-connector",
"config": {
"connector.class": "io.debezium.connector.postgresql.PostgresConnector",
"tasks.max": "1",
"group.id": "test",
"database.hostname": "127.0.0.1",
"database.port": "5432",
"database.user": "user",
"database.password": "password",