Konfig-Parameter zum künstlichen Verzögern der Verabeitung eingebaut
[demos/kafka/training] / src / main / java / de / juplo / kafka / ApplicationProperties.java
index dab3380..f852c00 100644 (file)
@@ -3,16 +3,35 @@ package de.juplo.kafka;
 import lombok.Getter;
 import lombok.Setter;
 import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.validation.annotation.Validated;
 
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.time.Duration;
 
-@ConfigurationProperties(prefix = "consumer")
+
+@ConfigurationProperties(prefix = "sumup.adder")
+@Validated
 @Getter
 @Setter
 public class ApplicationProperties
 {
+  @NotNull
+  @NotEmpty
   private String bootstrapServer;
+  @NotNull
+  @NotEmpty
   private String groupId;
+  @NotNull
+  @NotEmpty
   private String clientId;
+  @NotNull
+  @NotEmpty
   private String topic;
+  @NotNull
+  @NotEmpty
   private String autoOffsetReset;
+  @NotNull
+  private Duration commitInterval;
+  private Duration throttle;
 }