forked from rmqtt/rmqtt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrmqtt.toml
206 lines (188 loc) · 8.79 KB
/
rmqtt.toml
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
##--------------------------------------------------------------------
## General
##--------------------------------------------------------------------
##--------------------------------------------------------------------
## Task
##--------------------------------------------------------------------
#Concurrent task count for global task executor.
task.exec_workers = 2000
#Queue capacity for global task executor.
task.exec_queue_max = 300_000
#Concurrent task count for global local task executor, per worker thread.
task.local_exec_workers = 50
#Queue capacity for global local task executor, per worker thread.
task.local_exec_queue_max = 10_000
#The rate at which messages are dequeued from the 'LocalTaskExecQueue' message queue, per worker thread.
#default value: "u32::MAX,1s"
task.local_exec_rate_limit = "1000,1s"
##--------------------------------------------------------------------
## Node
##--------------------------------------------------------------------
#Node id
node.id = 1
#Busy status check switch.
#default value: true
node.busy.check_enable = true
#Busy status update interval.
#default value: 2s
node.busy.update_interval = "2s"
#The threshold for the 1-minute average system load used to determine system busyness.
#Value range: 0.0-100.0, default value: 80.0
node.busy.loadavg = 80.0
#The threshold for average CPU load used to determine system busyness.
#Value range: 0.0-100.0, default value: 90.0
node.busy.cpuloadavg = 90.0
#The threshold for determining high-concurrency connection handshakes in progress.
node.busy.handshaking = 0
##--------------------------------------------------------------------
## RPC
##--------------------------------------------------------------------
rpc.server_addr = "0.0.0.0:5363"
rpc.server_workers = 4
#Maximum number of messages sent in batch
rpc.batch_size = 128
#Client concurrent request limit
rpc.client_concurrency_limit = 128
#Connect and send to server timeout
rpc.client_timeout = "10s"
##--------------------------------------------------------------------
## Log
##--------------------------------------------------------------------
# Value: off | file | console | both
log.to = "console"
# Value: trace, debug, info, warn, error
log.level = "info"
log.dir = "/var/log/rmqtt"
log.file = "rmqtt.log"
##--------------------------------------------------------------------
## Plugins
##--------------------------------------------------------------------
#Plug in configuration file directory
plugins.dir = "rmqtt-plugins/"
#Plug in started by default, when the mqtt server is started
plugins.default_startups = [
#"rmqtt-retainer",
#"rmqtt-auth-http",
#"rmqtt-cluster-broadcast",
#"rmqtt-cluster-raft",
#"rmqtt-sys-topic",
#"rmqtt-message-storage",
#"rmqtt-session-storage",
"rmqtt-web-hook",
"rmqtt-http-api"
]
##--------------------------------------------------------------------
## MQTT
##--------------------------------------------------------------------
##--------------------------------------------------------------------
## Listeners
##--------------------------------------------------------------------
##--------------------------------------------------------------------
## MQTT/TCP - External TCP Listener for MQTT Protocol
listener.tcp.external.addr = "0.0.0.0:1883"
#Number of worker threads
listener.tcp.external.workers = 8
#The maximum number of concurrent connections allowed by the listener.
listener.tcp.external.max_connections = 1024000
#Maximum concurrent handshake limit, Default: 500
listener.tcp.external.max_handshaking_limit = 500
#Handshake timeout.
listener.tcp.external.handshake_timeout = "30s"
#Maximum allowed mqtt message length. 0 means unlimited, default: 1m
listener.tcp.external.max_packet_size = "1m"
#The maximum length of the TCP connection queue.
#It indicates the maximum number of TCP connection queues that are being handshaked three times in the system
listener.tcp.external.backlog = 1024
#Whether anonymous login is allowed. Default: true
listener.tcp.external.allow_anonymous = true
#A value of zero indicates disabling the keep-alive feature, where the server
#doesn't need to disconnect due to client inactivity, default: true
listener.tcp.external.allow_zero_keepalive = true
#Minimum allowable keepalive value for mqtt connection,
#less than this value will reject the connection(MQTT V3),
#less than this value will set keepalive to this value in CONNACK (MQTT V5),
#default: 0, unit: seconds
listener.tcp.external.min_keepalive = 0
#Maximum allowable keepalive value for mqtt connection,
#greater than this value will reject the connection(MQTT V3),
#greater than this value will set keepalive to this value in CONNACK (MQTT V5),
#default value: 65535, unit: seconds
listener.tcp.external.max_keepalive = 65535
# > 0.5, Keepalive * backoff * 2
listener.tcp.external.keepalive_backoff = 0.75
#Flight window size. The flight window is used to store the unanswered QoS 1 and QoS 2 messages
listener.tcp.external.max_inflight = 16
#Maximum length of message queue
listener.tcp.external.max_mqueue_len = 1000
#The rate at which messages are ejected from the message queue,
#default value: "u32::max_value(),1s"
listener.tcp.external.mqueue_rate_limit = "1000,1s"
#Maximum length of client ID allowed, Default: 65535
listener.tcp.external.max_clientid_len = 65535
#The maximum QoS level that clients are allowed to publish. default value: 2
listener.tcp.external.max_qos_allowed = 2
#The maximum level at which clients are allowed to subscribe to topics.
#0 means unlimited. default value: 0
listener.tcp.external.max_topic_levels = 0
#Whether support retain message, true/false, default value: true
listener.tcp.external.retain_available = true
#Session timeout, default value: 2 hours
listener.tcp.external.session_expiry_interval = "2h"
#QoS 1/2 message retry interval, 0 means no resend
listener.tcp.external.message_retry_interval = "20s"
#Message expiration time, 0 means no expiration
listener.tcp.external.message_expiry_interval = "5m"
#The maximum number of topics that a single client is allowed to subscribe to
#0 means unlimited, default value: 0
listener.tcp.external.max_subscriptions = 0
#Shared subscription switch, default value: true
listener.tcp.external.shared_subscription = true
#topic alias maximum, default value: 0, topic aliases not enabled. (MQTT 5.0)
listener.tcp.external.max_topic_aliases = 32
##--------------------------------------------------------------------
## Internal TCP Listener for MQTT Protocol
listener.tcp.internal.enable = true
listener.tcp.internal.addr = "0.0.0.0:11883"
listener.tcp.internal.workers = 4
listener.tcp.internal.max_connections = 102400
listener.tcp.internal.max_handshaking_limit = 500
listener.tcp.internal.handshake_timeout = "30s"
listener.tcp.internal.max_packet_size = "1M"
listener.tcp.internal.backlog = 512
listener.tcp.internal.allow_anonymous = true
listener.tcp.internal.allow_zero_keepalive = true
listener.tcp.internal.min_keepalive = 0
listener.tcp.internal.max_keepalive = 65535
listener.tcp.internal.keepalive_backoff = 0.75
listener.tcp.internal.max_inflight = 16
listener.tcp.internal.max_mqueue_len = 1000
listener.tcp.internal.mqueue_rate_limit = "1000,1s"
listener.tcp.internal.max_clientid_len = 65535
listener.tcp.internal.max_qos_allowed = 2
listener.tcp.internal.max_topic_levels = 0
listener.tcp.internal.retain_available = false
listener.tcp.internal.session_expiry_interval = "2h"
listener.tcp.internal.message_retry_interval = "30s"
listener.tcp.internal.message_expiry_interval = "5m"
listener.tcp.internal.max_subscriptions = 0
listener.tcp.internal.shared_subscription = true
listener.tcp.internal.max_topic_aliases = 0
##--------------------------------------------------------------------
## MQTT/TLS - External TLS Listener for MQTT Protocol, (TLSv1.2)
listener.tls.external.addr = "0.0.0.0:8883"
#listener.tls.external.cross_certificate = true
#listener.tls.external.cert = "./rmqtt-bin/rmqtt.fullchain.pem"
listener.tls.external.cross_certificate = false
listener.tls.external.cert = "./rmqtt-bin/rmqtt.pem"
listener.tls.external.key = "./rmqtt-bin/rmqtt.key"
##--------------------------------------------------------------------
## MQTT/WebSocket - External WebSocket Listener for MQTT Protocol
listener.ws.external.addr = "0.0.0.0:8080"
##--------------------------------------------------------------------
## MQTT/TLS-WebSocket - External TLS-WebSocket Listener for MQTT Protocol, (TLSv1.2)
listener.wss.external.addr = "0.0.0.0:8443"
#listener.wss.external.cross_certificate = true
#listener.wss.external.cert = "./rmqtt-bin/rmqtt.fullchain.pem"
listener.wss.external.cross_certificate = false
listener.wss.external.cert = "./rmqtt-bin/rmqtt.pem"
listener.wss.external.key = "./rmqtt-bin/rmqtt.key"