X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fkafka%2Fchat%2Fbackend%2FChatBackendProperties.java;h=4d8f18d5e7d03b72a8cb6f06e0d1c2ee39c4daa6;hb=a574411f66c4e76fa547e004912716e37a5f2a01;hp=5cd4535cbd4ebf98c6874fd4aa797cf85607c33a;hpb=ff98b068a91fc9e60e51bd4a95065633bb8ed2db;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 5cd4535c..4d8f18d5 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java +++ b/src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java @@ -16,19 +16,30 @@ public class ChatBackendProperties private int chatroomBufferSize = 8; private ServiceType services = ServiceType.inmemory; private InMemoryServicesProperties inmemory = new InMemoryServicesProperties(); + private KafkaServicesProperties kafka = new KafkaServicesProperties(); @Getter @Setter public static class InMemoryServicesProperties { - private ShardingStrategyType shardingStrategy = ShardingStrategyType.kafkalike; - private int numShards = 10; - private int[] ownedShards = { 2 }; + private ShardingStrategyType shardingStrategy = ShardingStrategyType.none; + private int numShards = 1; + private int[] ownedShards = new int[] { 0 }; private StorageStrategyType storageStrategy = StorageStrategyType.files; private String storageDirectory = Paths.get(System.getProperty("java.io.tmpdir"),"chat", "backend").toString(); } + @Getter + @Setter + public static class KafkaServicesProperties + { + private String clientId; + private String bootstrapServers = ":9092"; + private String topic = "test"; + private int numPartitions = 2; + } + public enum ServiceType { inmemory } public enum StorageStrategyType { files, mongodb } public enum ShardingStrategyType { none, kafkalike }