From 4b8e3a07c2949c6f83abf06f11e63b4f963276b5 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 13 Oct 2023 14:16:23 +0200 Subject: [PATCH] Beispiel: Schema erzeugen und abfragen --- README.sh | 3 +++ user-v1.schema | 1 + 2 files changed, 4 insertions(+) create mode 100644 user-v1.schema diff --git a/README.sh b/README.sh index 93b3a97..6e72cf5 100755 --- a/README.sh +++ b/README.sh @@ -37,3 +37,6 @@ docker-compose -f docker/docker-compose.yml up -d producer consumer-1 consumer-2 docker-compose -f docker/docker-compose.yml up -d cruise-control kafkacat -L -b :9092 -Xsecurity.protocol=sasl_plaintext -Xsasl.mechanisms=PLAIN -Xsasl.username=client -Xsasl.password=client-secret + +cat user-v1.schema|http POST http://localhost:8085/subjects/user/versions "Content-Type:application/vnd.schemaregistry.v1+json" +http GET http://0:8085/subjects/user/versions/1/schema diff --git a/user-v1.schema b/user-v1.schema new file mode 100644 index 0000000..fb11282 --- /dev/null +++ b/user-v1.schema @@ -0,0 +1 @@ +{ "schema": "{ \"type\": \"record\", \"name\": \"de.trion.avro.User\", \"fields\": [ { \"name\": \"username\", \"type\": \"string\" } ] }" } -- 2.20.1