projects
/
demos
/
kafka
/
chat
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NEU
[demos/kafka/chat]
/
src
/
main
/
java
/
de
/
juplo
/
kafka
/
chat
/
backend
/
ChatBackendProperties.java
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
5cd4535
..
4d8f18d
100644
(file)
--- 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 int chatroomBufferSize = 8;
private ServiceType services = ServiceType.inmemory;
private InMemoryServicesProperties inmemory = new InMemoryServicesProperties();
+ private KafkaServicesProperties kafka = new KafkaServicesProperties();
@Getter
@Setter
public static class InMemoryServicesProperties
{
@Getter
@Setter
public static class InMemoryServicesProperties
{
- private ShardingStrategyType shardingStrategy = ShardingStrategyType.
kafkalik
e;
- private int numShards = 1
0
;
- private int[] ownedShards =
{ 2
};
+ private ShardingStrategyType shardingStrategy = ShardingStrategyType.
non
e;
+ 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();
}
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 }
public enum ServiceType { inmemory }
public enum StorageStrategyType { files, mongodb }
public enum ShardingStrategyType { none, kafkalike }