WIP
authorKai Moritz <kai@juplo.de>
Wed, 13 Oct 2021 19:15:39 +0000 (21:15 +0200)
committerKai Moritz <kai@juplo.de>
Wed, 13 Oct 2021 19:15:39 +0000 (21:15 +0200)
src/main/java/de/juplo/kafka/wordcount/query/QueryApplicationProperties.java
src/main/java/de/juplo/kafka/wordcount/query/QueryStreamProcessor.java

index 19265f1..86a2925 100644 (file)
@@ -14,6 +14,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
 public class QueryApplicationProperties
 {
   private String bootstrapServer = "localhost:9092";
+  private String schemaRegistry = "https://schema-registry:9081/";
   private String applicationId = "query";
   private String rankingInputTopic = "top10";
   private String usersInputTopic = "users";
index b52e617..1c5c593 100644 (file)
@@ -67,7 +67,7 @@ public class QueryStreamProcessor
                props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, properties.getBootstrapServer());
                props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass());
                props.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, SpecificAvroSerde.class);
-               props.put(AbstractKafkaSchemaSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG, "https://schema-registry:9081/");
+               props.put(AbstractKafkaSchemaSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG, properties.getSchemaRegistry());
                props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
 
                streams = new KafkaStreams(builder.build(), props);