Start up the components:
docker-compose up -d
Let's check the Zookeeper Shell on the Zookeeper host:
docker-compose exec zookeeper zookeeper-shell localhost:2181
get /controller
{"version":2,"brokerid":1,"timestamp":"1689018188126","kraftControllerEpoch":-1}
curl -s -XGET localhost:8082/v3/clusters | jq
curl -s -XGET localhost:8082/topics | jq
curl -s -XGET http:https://localhost:8081/schemas/types | jq
Let's run V1 of our application:
cd confluent-schema-registry-v1
./gradlew clean
./gradlew generateAvroJava
./gradlew run
Now let's run V2 of our application:
cd ../confluent-schema-registry-v2
./gradlew clean
./gradlew generateAvroJava
./gradlew run
If we're viewing the topic in C3 (http:https://localhost:9021/), we should see both versions of the message in our avro-application-test-topic
:
And if you go to the Schema tab, you should see the two versions of the Schema: