Namespace für Konfig von `producer` in `juplo.producer` geändert
authorKai Moritz <kai@juplo.de>
Sun, 29 Sep 2024 13:32:38 +0000 (15:32 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 8 Nov 2024 17:05:08 +0000 (18:05 +0100)
docker/docker-compose.yml
src/main/java/de/juplo/kafka/ApplicationProperties.java
src/main/resources/application.yml
src/test/java/de/juplo/kafka/ApplicationTests.java

index 69ac986..5807af0 100644 (file)
@@ -192,9 +192,9 @@ services:
   producer:
     image: juplo/spring-producer:1.0-SNAPSHOT
     environment:
-      producer.bootstrap-server: kafka:9092
-      producer.client-id: producer
-      producer.topic: test
+      juplo.producer.bootstrap-server: kafka:9092
+      juplo.producer.client-id: producer
+      juplo.producer.topic: test
 
   consumer-1:
     image: juplo/simple-consumer:1.0-SNAPSHOT
index ce53273..54114eb 100644 (file)
@@ -10,7 +10,7 @@ import org.springframework.validation.annotation.Validated;
 import java.time.Duration;
 
 
-@ConfigurationProperties(prefix = "producer")
+@ConfigurationProperties(prefix = "juplo.producer")
 @Validated
 @Getter
 @Setter
index ce70629..f0217a6 100644 (file)
@@ -1,11 +1,12 @@
-producer:
-  bootstrap-server: :9092
-  client-id: DEV
-  topic: test
-  acks: -1
-  batch-size: 16384
-  linger: 0
-  compression-type: gzip
+juplo:
+  producer:
+    bootstrap-server: :9092
+    client-id: DEV
+    topic: test
+    acks: -1
+    batch-size: 16384
+    linger: 0
+    compression-type: gzip
 management:
   endpoint:
     shutdown:
@@ -21,13 +22,13 @@ management:
       enabled: true
 info:
   kafka:
-    bootstrap-server: ${producer.bootstrap-server}
-    client-id: ${producer.client-id}
-    topic: ${producer.topic}
-    acks: ${producer.acks}
-    batch-size: ${producer.batch-size}
-    linger: ${producer.linger}
-    compression-type: ${producer.compression-type}
+    bootstrap-server: ${juplo.producer.bootstrap-server}
+    client-id: ${juplo.producer.client-id}
+    topic: ${juplo.producer.topic}
+    acks: ${juplo.producer.acks}
+    batch-size: ${juplo.producer.batch-size}
+    linger: ${juplo.producer.linger}
+    compression-type: ${juplo.producer.compression-type}
 logging:
   level:
     root: INFO
index 394007b..6d07e5a 100644 (file)
@@ -29,8 +29,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
     properties = {
         "spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}",
         "spring.kafka.consumer.auto-offset-reset=earliest",
-        "producer.bootstrap-server=${spring.embedded.kafka.brokers}",
-        "producer.topic=" + TOPIC})
+        "juplo.producer.bootstrap-server=${spring.embedded.kafka.brokers}",
+        "juplo.producer.topic=" + TOPIC})
 @AutoConfigureMockMvc
 @EmbeddedKafka(topics = TOPIC, partitions = PARTITIONS)
 @Slf4j