This demo automatically deploys the topology of services as defined in the Debezium Tutorial along with Debezium UI. You can use the Debezium UI to view available connectors and create new connectors.
The Debezium UI is only available with Debezium version 1.5 and above.
Launch all the required components for the topology as defined in tutorial example
export DEBEZIUM_VERSION=2.1
docker-compose up -d
Creating db-mysql ... done
Creating db-pg ... done
Creating zookeeper ... done
Creating db-mongo ... done
Creating ui-demo_mongo-initializer_1 ... done
Creating kafka ... done
Creating connect ... done
Creating debezium-ui ... done
The Debezium UI will be available on http://localhost:8080
You can create Postgres, Mongo DB, MySQL & SQL Server (coming soon) connectors using the Debezium UI. Create the connectors using the Create connector wizard in the Debezium UI. The first two steps of the wizard are mandatory (i.e. selecting the "Connector type" in step 1, then entering the basic connection "Properties" in step 2). Additional steps in the wizard allow you to configure a variety of optional properties for each connector type.
For this demo, see the connection properties you can use for each connector type as illustrated below:
Topic Prefix: inventory
Cluster ID: 12345
Hostname: db-mysql
User: debezium
Password: dbz
Kafka broker addresses: kafka:9092
Database schema history topic name: dbhistory.inventory
Topix prefix: fulfillment
Hostname: db-pg
User: postgres
Password: postgres
Database:postgres
Topic prefix: inventory_mongo
Hosts: db-mongo:27017
User: admin
Password: admin
After the connectors are registered and running, you can interact via cli to query and make changes to the dbs
To connect with MySQL via cli:
docker exec -it db-mysql bash -c 'mysql -u $MYSQL_USER -p$MYSQL_PASSWORD inventory'
To connect with PostgreSQL via cli:
docker exec -it db-pg bash -c 'psql -U $POSTGRES_USER $POSTGRES_PASSWORD'
To connect with MongoDB via cli:
mongo -u admin -p admin --authenticationDatabase admin localhost:37017/inventory
You can examine change events which occur due to database changes
# Open in a new terminal
# Viewing the change events in the kafka container
docker exec -it kafka bash
./bin/kafka-console-consumer.sh --bootstrap-server kafka:9092 --topic [TOPIC_NAME] --from-beginning
When finished with the demo, stop all of the services.
$ docker-compose down