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 topic = "test";
+ private int numPartitions = 2;
+ }
+
public enum ServiceType { inmemory }
public enum StorageStrategyType { files, mongodb }
public enum ShardingStrategyType { none, kafkalike }