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.requests")
+@Validated
@Getter
@Setter
public class ApplicationProperties
{
+ @NotNull
+ @NotEmpty
private String bootstrapServer;
+ @NotNull
+ @NotEmpty
private String groupId;
+ @NotNull
+ @NotEmpty
private String clientId;
- private String topic;
+ @NotNull
+ @NotEmpty
+ private String topicIn;
+ @NotNull
+ @NotEmpty
+ private String autoOffsetReset;
+ @NotNull
+ private Duration commitInterval;
+ @NotNull
+ @NotEmpty
+ private String topicOut;
+ @NotNull
+ @NotEmpty
+ private String acks;
+ @NotNull
+ private Integer batchSize;
+ @NotNull
+ private Integer lingerMs;
+ @NotNull
+ @NotEmpty
+ private String compressionType;
}