-
Notifications
You must be signed in to change notification settings - Fork 0
/
unitd.conf
86 lines (77 loc) · 2.98 KB
/
unitd.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
// Default HTTP(S) address:port to listen on for websocket. Either a
// numeric or a canonical name, e.g. ":80" or ":https". Could include a host name, e.g.
// "localhost:80".
// Could be blank: if TLS is not configured, will use ":80", otherwise ":443".
// Can be overridden from the command line, see option --listen.
"listen": ":6060",
// Default HTTP(S) address:port to listen on for grpc. Either a
// numeric or a canonical name, e.g. ":80" or ":https". Could include a host name, e.g.
// "localhost:80".
// Could be blank: if TLS is not configured, will use ":80", otherwise ":443".
// Can be overridden from the command line, see option --listen.
"grpc_listen": ":6061",
// Default logging level is "InfoLevel" so to enable the debug log set the "LogLevel" to "DebugLevel".
"logging_level": "Error",
// Maximum message size allowed from client in bytes (262144 = 256KB).
// Intended to prevent malicious clients from sending very large messages inband (does
// not affect out-of-band large files).
"max_message_size": 262144,
// Maximum number of subscribers per group topic.
"max_subscriber_count": 128,
// Encryption configuration
"encryption_config": {
// chacha20poly1305 encryption key for client Ids and topic keys. 32 random bytes base64-encoded.
// Generate your own and keep it secret.
"key": "4BWm1vZletvrCDGWsF6mex8oBSd59m6I",
// Key identifier. it is useful when you use multiple keys.
"identifier":"local",
// slealed flag tells if key in the configuration is sealed.
"sealed":false,
// timestamp is helpful to determine the latest key in case of keyroll over.
"timestamp":1522325758
},
// Cluster-mode configuration.
"cluster_config": {
// Name of this node. Can be assigned from the command line.
// Empty string disables clustering.
"self": "",
// List of available nodes.
"nodes": [
// Name and TCP address of every node in the cluster.
{"name": "one", "addr":"localhost:12001"},
{"name": "two", "addr":"localhost:12002"},
{"name": "three", "addr":"localhost:12003"}
],
// Failover config.
"failover": {
// Failover is enabled.
"enabled": true,
// Time in milliseconds between heartbeats.
"heartbeat": 100,
// Initiate leader election when the leader is not available for this many heartbeats.
"vote_after": 8,
// Consider node failed when it missed this many heartbeats.
"node_fail_after": 16
}
},
// Database configuration
"store_config": {
// clean session to start clean and reset message store on service restart
"clean_session": true,
// Configurations of individual adapters.
"adapters": {
// unitdb configuration.
"unitdb": {
// Name of the database.
"database": "unitd",
// Database dir
"dir": "/tmp/unitdb",
// Memdb message store size
"mem_size": 500000000,
// Log release duration to timeout pending messages and release messages from message store
"log_release_duration": "1m"
}
}
}
}