This is an example project to demonstrate how to use debezium to capture data changes as events from SpringBoot application to kafka, and consume these events at downstream application.
-
install JDK-17, Maven, and Jmeter (recommended to use IntelliJ IDE)
-
clone the repo and run
mvn install
or./mvnw install
in./producer
and./consumer
-
install docker and docker-compose
-
execute
docker-compose up -d
-
execute
curl -i -X POST -H "Content-Type:application/json" localhost:8083/connectors/ -d "@./connector.json"
orcurl.exe -i -X POST -H "Content-Type:application/json" localhost:8083/connectors/ -d "@./connector.json"
-
run each application in
./producer
and./consumer
-
launch Jmeter and open
cdc.jmx
, then execute the test script -
view
http://localhost:8080/
, you can see ui for kafka -
view
http://localhost:8002/actuator/prometheus
, you can see kafka consumer metrics start with prefixspring_kafka_