forked from wind-c/comqtt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode1.yml
86 lines (81 loc) · 5.13 KB
/
node1.yml
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
storage-way: 3 #Storage way optional items:0 memory、1 bolt、2 badger、3 redis;Only redis can be used in cluster mode.
bridge-way: 0 #Bridge way optional items:0 disable、1 kafka
bridge-path: ./cmd/config/bridge-kafka.yml #The bridge config file path
pprof-enable: false #Whether to enable the performance analysis tool http://ip:6060
auth:
way: 0 #Authentication way: 0 anonymous, 1 username and password, 2 clientid
datasource: 1 #Optional items:0 free、1 redis、2 mysql、3 postgresql、4 http ...
conf-path: ./cmd/config/auth-redis.yml #The config file path should correspond to the auth-datasource
blacklist-path: ./cmd/config/blacklist.yml #Special rules outside the usual rules (black and white list),this configuration is invalid for anonymous authentication
cluster:
discovery-way: 0 #The node discovery way in the cluster: 0 serf、1 memberlist、2 mDNS
node-name: c01 #For versatility, use pure numbers. The name of node must be unique in the cluster.
bind-addr: 127.0.0.1 #The ip addr used for discovery and communication between nodes. It is usually set to the intranet ip addr.
bind-port: 7946 #The port is used for both UDP and TCP gossip. Used for member discovery and join.
advertise-addr: #Configuration related to what address to advertise to other cluster members. Used for nat traversal. The default value is bind-addr.
advertise-port: #Used for member communication. If this port is not set, the default value is bind-port.
members: [127.0.0.1:7946] #Seeds member list, format such as 192.168.0.103:7946,192.168.0.104:7946
queue-depth: 10240 #Size of memberlist internal channel which handles UDP messages.
raft-impl: 0 #The raft implementer: 0 hashicorp/raft, 1 etcd/raft
raft-port: 8946 #Distributed consistency coordination communication port
raft-dir: data/c01 #Distributed data storage directory
raft-bootstrap: true #Should be `true` for the first node of the cluster. It is required so that it can elect a leader without any other nodes being present.
grpc-enable: true #Grpc is used for raft transport and reliable communication between nodes
grpc-port: 17946 #Grpc communication port between nodes
inbound-pool-size: 40960 #The maximum number of goroutine to process incoming messages.
outbound-pool-size: 40960 #The maximum number of goroutine to process outgoing messages.
inout-pool-nonblocking: false #Pool size is unlimited, when inout-pool-nonblocking is true, inbound-pool-size and outbound-pool-size is inoperative.
mqtt:
tcp: :1883
ws: :1882
http: :8080
tls:
ca-cert: #CA root certificate file path. Not empty enable bidirectional authentication.
server-cert: #Server certificate file path
server-key: #server rsa private key file path
options:
client-write-buffer-size: 1024 #It is the number of individual workers and queues to initialize.
client-read-buffer-size: 1024 #It is the size of the queue per worker.
sys-topic-resend-interval: 1 #It specifies the interval between $SYS topic updates in seconds.
capabilities:
compatibilities:
obscure-not-authorized: false #Return unspecified errors instead of not authorized
passive-client-disconnect: false #Don't disconnect the client forcefully after sending disconnect packet (paho)
always-return-response: false #Always return response info (useful for testing)
restore-sys-info-restart: false #Restore system info from store as if server never stopped
maximum-message-expiry-interval: 86400 #Maximum message expiry if message expiry is 0 or over
maximum-session-expiry-interval: 4294967295 #Maximum number of seconds to keep disconnected sessions
maximum-client-writes-pending: 65535 #Maximum number of pending message writes for a client
maximum-packet-size: 0 #Maximum packet size, 0 unlimited
receive-maximum: 1024 #Maximum number of concurrent qos messages per client
topic-alias-maximum: 65535 #Maximum topic alias value
maximum-qos: 2 #Maxmimum qos value available to clients
retain-available: 1 #Retain messages is available
wildcard-sub-available: 1 #Wildcard subscriptions are available
sub-id-available: 1 #Subscription identifiers are available
shared-sub-available: 1 #Shared subscriptions are available
minimum-protocol-version: 3 #Minimum supported mqtt version (3.0.0)
redis:
options:
addr: 127.0.0.1:6379
username:
password:
db: 0
prefix: comqtt
log:
enable: true
env: 0 #0 dev or 1 prod
format: 0 #output format 0console or 1json
caller: false #whether to display code line number
info-file: ./logs/comqtt-info.log
error-file: ./logs/comqtt-error.log # level >= 3, 3Error(default) 4Fatal 5Panic 6NoLevel 7Off
thirdparty-file: ./logs/thirdparty.log # level 6NoLevel, logs of the third-party library
maxsize: 100 #100M
max-age: 30 #30day
max-backups: 10 #number of log files
localtime: true #true or false
compress: true #true or false
level: 1 #-1Trace 0Debug 1Info 2Warn 3Error(default) 4Fatal 5Panic 6NoLevel 7Off
sampler: #a maximum of three logs can be output every second
burst: 3 #log count
period: 1 #second