From: Kai Moritz Date: Fri, 26 Apr 2024 12:15:12 +0000 (+0200) Subject: Die Daten werden im Topic als JSON mit JSON-Schema abgelegt X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=71cb65dff9eaad4492513f365d5a9a5265c31e73;p=demos%2Fkafka%2Ftraining Die Daten werden im Topic als JSON mit JSON-Schema abgelegt --- 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",