To start all the services like postgres, kafka, zookeeper, kafdrop, and connect, run the following command.
make start
curl -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d '
{
"name": "users-connector",
"config": {
"connector.class": "io.debezium.connector.postgresql.PostgresConnector",
"topic.prefix": "database",
"database.hostname": "database",
"database.port": "5432",
"database.user": "warlock",
"database.password": "warlock",
"database.dbname": "warlock",
"database.server.name": "database",
"table.include.list": "public.users",
"plugin.name": "pgoutput",
"database.history.kafka.bootstrap.servers": "kafka:9092"
}
}'
INSERT INTO users (username, email, password)
VALUES
('user1', '[email protected]', 'password1'),
('user2', '[email protected]', 'password2'),
('user3', '[email protected]', 'password3'),
('user4', '[email protected]', 'password4'),
('user5', '[email protected]', 'password5');
You can see the new topic database.public.users
in kafdrop dashboard.
make stop