X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fkafka%2FApplicationProperties.java;h=673613a840f2768af3cb9cf04b6c8e7efb39e584;hb=1cd2d60f29b44574a2b6ca99cb7eeafa78cb4c90;hp=ab268902c745b5c360a9cbd71d0f02472bf68fbc;hpb=ca946f746344bdff7d92325d56a013729b6055a3;p=demos%2Fkafka%2Ftraining diff --git a/src/main/java/de/juplo/kafka/ApplicationProperties.java b/src/main/java/de/juplo/kafka/ApplicationProperties.java index ab26890..673613a 100644 --- a/src/main/java/de/juplo/kafka/ApplicationProperties.java +++ b/src/main/java/de/juplo/kafka/ApplicationProperties.java @@ -4,14 +4,33 @@ import lombok.Getter; import lombok.Setter; import org.springframework.boot.context.properties.ConfigurationProperties; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + + @ConfigurationProperties(prefix = "producer") @Getter @Setter public class ApplicationProperties { + @NotNull + @NotEmpty private String bootstrapServer; + @NotNull + @NotEmpty private String clientId; + @NotNull + @NotEmpty private String topic; + private Integer partition; + @NotNull + @NotEmpty private String acks; - private int throttleMs; + @NotNull + private Integer batchSize; + @NotNull + private Integer lingerMs; + @NotNull + @NotEmpty + private String compressionType; }