From 71cb65dff9eaad4492513f365d5a9a5265c31e73 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 26 Apr 2024 14:15:12 +0200 Subject: [PATCH] Die Daten werden im Topic als JSON mit JSON-Schema abgelegt --- README.sh | 2 +- datagen-source-connector.json | 3 +++ s3-sink-connector.json | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.sh b/README.sh index ba773b3..5a0569d 100755 --- a/README.sh +++ b/README.sh @@ -30,7 +30,7 @@ echo echo "Lese probeweise 5 Nachrichten aus den erzeugten Daten ein" echo docker compose -f docker/docker-compose.yml exec cli \ - kafka-avro-console-consumer \ + kafka-console-consumer \ --bootstrap-server kafka:9092 \ --topic test \ --property schema.registry.url=http://schema-registry:8085 \ diff --git a/datagen-source-connector.json b/datagen-source-connector.json index e9bc9bc..678a8cf 100644 --- a/datagen-source-connector.json +++ b/datagen-source-connector.json @@ -4,6 +4,9 @@ "name": "datagen-source", "connector.class": "io.confluent.kafka.connect.datagen.DatagenConnector", "kafka.topic": "test", + "value.converter": "io.confluent.connect.json.JsonSchemaConverter", + "value.converter.schemas.enable": "true", + "value.converter.schema.registry.url": "http://schema-registry:8085", "schema.string": "{\"type\":\"record\",\"name\":\"myrecord\",\"fields\":[{\"name\":\"f1\",\"type\":\"string\"}]}" } } diff --git a/s3-sink-connector.json b/s3-sink-connector.json index 15f3686..98bd525 100644 --- a/s3-sink-connector.json +++ b/s3-sink-connector.json @@ -4,6 +4,9 @@ "name": "s3-sink", "connector.class": "io.confluent.connect.s3.S3SinkConnector", "topics": "test", + "value.converter": "io.confluent.connect.json.JsonSchemaConverter", + "value.converter.schemas.enable": "true", + "value.converter.schema.registry.url": "http://schema-registry:8085", "s3.bucket.name": "juplo", "s3.part.size": "5242880", "timezone": "Europe/Berlin", -- 2.20.1