X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fkafka%2Fchat%2Fbackend%2FChatBackendProperties.java;h=9a73f6f173cb85e0a227ea10f6e6eaf7250c905e;hb=08e3776dd08ab217a4a3af2e855eafab57f52d62;hp=ec0b35f8d55939ad084ed6b687387afa18ff3e65;hpb=cc38c4721e5076970d5dcea57dbd066906f0f3da;p=demos%2Fkafka%2Fchat diff --git a/src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java b/src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java index ec0b35f8..9a73f6f1 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java +++ b/src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java @@ -4,6 +4,7 @@ import lombok.Getter; import lombok.Setter; import org.springframework.boot.context.properties.ConfigurationProperties; +import java.net.URI; import java.nio.file.Paths; @@ -12,6 +13,7 @@ import java.nio.file.Paths; @Setter public class ChatBackendProperties { + private String instanceId = "DEV"; private String allowedOrigins = "http://localhost:4200"; private int chatroomBufferSize = 8; private ServiceType services = ServiceType.inmemory; @@ -25,7 +27,8 @@ public class ChatBackendProperties { private ShardingStrategyType shardingStrategy = ShardingStrategyType.none; private int numShards = 1; - private int[] ownedShards = new int[] { 0 }; + private int[] ownedShards = new int[0]; + private URI[] shardOwners = new URI[0]; private StorageStrategyType storageStrategy = StorageStrategyType.none; private String storageDirectory = Paths.get(System.getProperty("java.io.tmpdir"),"chat", "backend").toString(); } @@ -34,11 +37,14 @@ public class ChatBackendProperties @Setter public static class KafkaServicesProperties { + private URI instanceUri = URI.create("http://localhost:8080"); private String clientIdPrefix = "DEV"; private String bootstrapServers = ":9092"; private String infoChannelTopic = "info_channel"; private String dataChannelTopic = "data_channel"; private int numPartitions = 2; + private String haproxyRuntimeApi = "haproxy:8401"; + private String haproxyMap = "/usr/local/etc/haproxy/sharding.map"; } public enum ServiceType { inmemory, kafka }