emqx.conf 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087
  1. ##====================================================================
  2. ## EMQ X Configuration R3.0
  3. ##====================================================================
  4. ##--------------------------------------------------------------------
  5. ## Cluster
  6. ##--------------------------------------------------------------------
  7. ## Cluster name.
  8. ##
  9. ## Value: String
  10. cluster.name = emqxcl
  11. ## Specify the erlang distributed protocol.
  12. ##
  13. ## Value: Enum
  14. ## - inet_tcp: the default; handles TCP streams with IPv4 addressing.
  15. ## - inet6_tcp: handles TCP with IPv6 addressing.
  16. ## - inet_tls: using TLS for Erlang Distribution.
  17. ##
  18. ## vm.args: -proto_dist inet_tcp
  19. cluster.proto_dist = inet_tcp
  20. ## Cluster auto-discovery strategy.
  21. ##
  22. ## Value: Enum
  23. ## - manual: Manual join command
  24. ## - static: Static node list
  25. ## - mcast: IP Multicast
  26. ## - dns: DNS A Record
  27. ## - etcd: etcd
  28. ## - k8s: Kubernates
  29. ##
  30. ## Default: manual
  31. cluster.discovery = manual
  32. ## Enable cluster autoheal from network partition.
  33. ##
  34. ## Value: on | off
  35. ##
  36. ## Default: on
  37. cluster.autoheal = on
  38. ## Autoclean down node. A down node will be removed from the cluster
  39. ## if this value > 0.
  40. ##
  41. ## Value: Duration
  42. ## -h: hour, e.g. '2h' for 2 hours
  43. ## -m: minute, e.g. '5m' for 5 minutes
  44. ## -s: second, e.g. '30s' for 30 seconds
  45. ##
  46. ## Default: 5m
  47. cluster.autoclean = 5m
  48. ##--------------------------------------------------------------------
  49. ## Cluster using static node list
  50. ## Node list of the cluster.
  51. ##
  52. ## Value: String
  53. ## cluster.static.seeds = emqx1@127.0.0.1,emqx2@127.0.0.1
  54. ##--------------------------------------------------------------------
  55. ## Cluster using IP Multicast.
  56. ## IP Multicast Address.
  57. ##
  58. ## Value: IP Address
  59. ## cluster.mcast.addr = 239.192.0.1
  60. ## Multicast Ports.
  61. ##
  62. ## Value: Port List
  63. ## cluster.mcast.ports = 4369,4370
  64. ## Multicast Iface.
  65. ##
  66. ## Value: Iface Address
  67. ##
  68. ## Default: 0.0.0.0
  69. ## cluster.mcast.iface = 0.0.0.0
  70. ## Multicast Ttl.
  71. ##
  72. ## Value: 0-255
  73. ## cluster.mcast.ttl = 255
  74. ## Multicast loop.
  75. ##
  76. ## Value: on | off
  77. ## cluster.mcast.loop = on
  78. ##--------------------------------------------------------------------
  79. ## Cluster using DNS A records.
  80. ## DNS name.
  81. ##
  82. ## Value: String
  83. ## cluster.dns.name = localhost
  84. ## The App name is used to build 'node.name' with IP address.
  85. ##
  86. ## Value: String
  87. ## cluster.dns.app = emqx
  88. ##--------------------------------------------------------------------
  89. ## Cluster using etcd
  90. ## Etcd server list, seperated by ','.
  91. ##
  92. ## Value: String
  93. ## cluster.etcd.server = http://127.0.0.1:2379
  94. ## The prefix helps build nodes path in etcd. Each node in the cluster
  95. ## will create a path in etcd: v2/keys/<prefix>/<cluster.name>/<node.name>
  96. ##
  97. ## Value: String
  98. ## cluster.etcd.prefix = emqxcl
  99. ## The TTL for node's path in etcd.
  100. ##
  101. ## Value: Duration
  102. ##
  103. ## Default: 1m, 1 minute
  104. ## cluster.etcd.node_ttl = 1m
  105. ## Path to a file containing the client's private PEM-encoded key.
  106. ##
  107. ## Value: File
  108. ## cluster.etcd.ssl.keyfile = {{ platform_etc_dir }}/certs/client-key.pem
  109. ## The path to a file containing the client's certificate.
  110. ##
  111. ## Value: File
  112. ## cluster.etcd.ssl.certfile = {{ platform_etc_dir }}/certs/client.pem
  113. ## Path to the file containing PEM-encoded CA certificates. The CA certificates
  114. ## are used during server authentication and when building the client certificate chain.
  115. ##
  116. ## Value: File
  117. ## cluster.etcd.ssl.cacertfile = {{ platform_etc_dir }}/certs/ca.pem
  118. ##--------------------------------------------------------------------
  119. ## Cluster using Kubernates
  120. ## Kubernates API server list, seperated by ','.
  121. ##
  122. ## Value: String
  123. ## cluster.k8s.apiserver = http://10.110.111.204:8080
  124. ## The service name helps lookup EMQ nodes in the cluster.
  125. ##
  126. ## Value: String
  127. ## cluster.k8s.service_name = emqx
  128. ## The address type is used to extract host from k8s service.
  129. ##
  130. ## Value: ip | dns | hostname
  131. ## cluster.k8s.address_type = ip
  132. ## The app name helps build 'node.name'.
  133. ##
  134. ## Value: String
  135. ## cluster.k8s.app_name = emqx
  136. ## The suffix added to dns and hostname get from k8s service
  137. ##
  138. ## Value: String
  139. ## cluster.k8s.suffix = pod.cluster.local
  140. ## Kubernates Namespace
  141. ##
  142. ## Value: String
  143. ## cluster.k8s.namespace = default
  144. ##--------------------------------------------------------------------
  145. ## Node
  146. ##--------------------------------------------------------------------
  147. ## Node name.
  148. ##
  149. ## See: http://erlang.org/doc/reference_manual/distributed.html
  150. ##
  151. ## Value: <name>@<host>
  152. ##
  153. ## Default: emqx@127.0.0.1
  154. node.name = emqx@127.0.0.1
  155. ## Cookie for distributed node communication.
  156. ##
  157. ## Value: String
  158. node.cookie = emqxsecretcookie
  159. ## Data dir for the node
  160. ##
  161. ## Value: Folder
  162. node.data_dir = {{ platform_data_dir }}
  163. ## Heartbeat monitoring of an Erlang runtime system. Comment the line to disable
  164. ## heartbeat, or set the value as 'on'
  165. ##
  166. ## Value: on
  167. ##
  168. ## vm.args: -heart
  169. ## node.heartbeat = on
  170. ## Sets the number of threads in async thread pool. Valid range is 0-1024.
  171. ##
  172. ## See: http://erlang.org/doc/man/erl.html
  173. ##
  174. ## Value: 0-1024
  175. ##
  176. ## vm.args: +A Number
  177. node.async_threads = 32
  178. ## Sets the maximum number of simultaneously existing processes for this
  179. ## system if a Number is passed as value.
  180. ##
  181. ## See: http://erlang.org/doc/man/erl.html
  182. ##
  183. ## Value: Number [1024-134217727]
  184. ##
  185. ## vm.args: +P Number
  186. node.process_limit = 2048000
  187. ## Sets the maximum number of simultaneously existing ports for this system.
  188. ##
  189. ## See: http://erlang.org/doc/man/erl.html
  190. ##
  191. ## Value: Number [1024-134217727]
  192. ##
  193. ## vm.args: +Q Number
  194. node.max_ports = 1024000
  195. ## Set the distribution buffer busy limit (dist_buf_busy_limit).
  196. ##
  197. ## See: http://erlang.org/doc/man/erl.html
  198. ##
  199. ## Value: Number [1KB-2GB]
  200. ##
  201. ## vm.args: +zdbbl size
  202. node.dist_buffer_size = 8MB
  203. ## Sets the maximum number of ETS tables. Note that mnesia and SSL will
  204. ## create temporary ETS tables.
  205. ##
  206. ## Value: Number
  207. ##
  208. ## vm.args: +e Number
  209. node.max_ets_tables = 256000
  210. ## Tweak GC to run more often.
  211. ##
  212. ## Value: Number [0-65535]
  213. ##
  214. ## vm.args: -env ERL_FULLSWEEP_AFTER Number
  215. node.fullsweep_after = 1000
  216. ## Crash dump log file.
  217. ##
  218. ## Value: Log file
  219. node.crash_dump = {{ platform_log_dir }}/crash.dump
  220. ## Specify SSL Options in the file if using SSL for Erlang Distribution.
  221. ##
  222. ## Value: File
  223. ##
  224. ## vm.args: -ssl_dist_optfile <File>
  225. ## node.ssl_dist_optfile = {{ platform_etc_dir }}/ssl_dist.conf
  226. ## Sets the net_kernel tick time. TickTime is specified in seconds.
  227. ## Notice that all communicating nodes are to have the same TickTime
  228. ## value specified.
  229. ##
  230. ## See: http://www.erlang.org/doc/man/kernel_app.html#net_ticktime
  231. ##
  232. ## Value: Number
  233. ##
  234. ## vm.args: -kernel net_ticktime Number
  235. node.dist_net_ticktime = 60
  236. ## Sets the port range for the listener socket of a distributed Erlang node.
  237. ## Note that if there are firewalls between clustered nodes, this port segment
  238. ## for nodes’ communication should be allowed.
  239. ##
  240. ## See: http://www.erlang.org/doc/man/kernel_app.html
  241. ##
  242. ## Value: Port [1024-65535]
  243. node.dist_listen_min = 6369
  244. node.dist_listen_max = 6369
  245. ##--------------------------------------------------------------------
  246. ## RPC
  247. ##--------------------------------------------------------------------
  248. ## RPC Mode.
  249. ##
  250. ## Value: sync | async
  251. rpc.mode = async
  252. ## Max batch size of async RPC requests.
  253. ##
  254. ## Value: Integer
  255. ## Zero or negative value disables rpc batching.
  256. ##
  257. ## NOTE: RPC batch won't work when rpc.mode = sync
  258. rpc.async_batch_size = 256
  259. ## TCP server port for RPC.
  260. ##
  261. ## Value: Port [1024-65535]
  262. rpc.tcp_server_port = 5369
  263. ## TCP port for outgoing RPC connections.
  264. ##
  265. ## Value: Port [1024-65535]
  266. rpc.tcp_client_port = 5369
  267. ## Number of utgoing RPC connections.
  268. ##
  269. ## Value: Interger [1-256]
  270. rpc.tcp_client_num = 32
  271. ## RCP Client connect timeout.
  272. ##
  273. ## Value: Seconds
  274. rpc.connect_timeout = 5s
  275. ## TCP send timeout of RPC client and server.
  276. ##
  277. ## Value: Seconds
  278. rpc.send_timeout = 5s
  279. ## Authentication timeout
  280. ##
  281. ## Value: Seconds
  282. rpc.authentication_timeout = 5s
  283. ## Default receive timeout for call() functions
  284. ##
  285. ## Value: Seconds
  286. rpc.call_receive_timeout = 15s
  287. ## Socket idle keepalive.
  288. ##
  289. ## Value: Seconds
  290. rpc.socket_keepalive_idle = 900s
  291. ## TCP Keepalive probes interval.
  292. ##
  293. ## Value: Seconds
  294. rpc.socket_keepalive_interval = 75s
  295. ## Probes lost to close the connection
  296. ##
  297. ## Value: Integer
  298. rpc.socket_keepalive_count = 9
  299. ## Size of TCP send buffer.
  300. ##
  301. ## Value: Bytes
  302. rpc.socket_sndbuf = 1MB
  303. ## Size of TCP receive buffer.
  304. ##
  305. ## Value: Seconds
  306. rpc.socket_recbuf = 1MB
  307. ## Size of user-level software socket buffer.
  308. ##
  309. ## Value: Seconds
  310. rpc.socket_buffer = 1MB
  311. ##--------------------------------------------------------------------
  312. ## Log
  313. ##--------------------------------------------------------------------
  314. ## Where to emit the logs.
  315. ## Enable the console (standard output) logs.
  316. ##
  317. ## Value: off | file | console | both
  318. ## - off: disable logs entirely
  319. ## - file: write logs only to file
  320. ## - console: write logs only to standard I/O
  321. ## - both: write logs both to file and standard I/O
  322. log.to = both
  323. ## The log severity level.
  324. ##
  325. ## Value: debug | info | notice | warning | error | critical | alert | emergency
  326. ##
  327. ## Note: Only the messages with severity level higher than or equal to
  328. ## this level will be logged.
  329. ##
  330. ## Default: warning
  331. log.level = warning
  332. ## The dir for log files.
  333. ##
  334. ## Value: Folder
  335. log.dir = {{ platform_log_dir }}
  336. ## The log filename for logs of level specified in "log.level".
  337. ##
  338. ## Value: String
  339. ## Default: emqx.log
  340. log.file = emqx.log
  341. ## Limits the total number of characters printed for each log event.
  342. ##
  343. ## Value: Integer
  344. ## Default: No Limit
  345. #log.chars_limit = 8192
  346. ## Maximum size of each log file.
  347. ##
  348. ## Value: Number
  349. ## Default: 10M
  350. ## Supported Unit: KB | MB | G
  351. log.rotation.size = 10MB
  352. ## Maximum rotation count of log files.
  353. ##
  354. ## Value: Number
  355. ## Default: 5
  356. log.rotation.count = 5
  357. ## To create additional log files for specific log levels.
  358. ##
  359. ## Value: File Name
  360. ## Format: log.$level.file = $filename,
  361. ## where "$level" can be one of: debug, info, notice, warning,
  362. ## error, critical, alert, emergency
  363. ## Note: Log files for a specific log level will only contain all the logs
  364. ## that higher than or equal to that level
  365. ##
  366. #log.info.file = info.log
  367. #log.error.file = error.log
  368. ##--------------------------------------------------------------------
  369. ## Authentication/Access Control
  370. ##--------------------------------------------------------------------
  371. ## Allow anonymous authentication by default if no auth plugins loaded.
  372. ## Notice: Disable the option in production deployment!
  373. ##
  374. ## Value: true | false
  375. allow_anonymous = true
  376. ## Allow or deny if no ACL rules matched.
  377. ##
  378. ## Value: allow | deny
  379. acl_nomatch = allow
  380. ## Default ACL File.
  381. ##
  382. ## Value: File Name
  383. acl_file = {{ platform_etc_dir }}/acl.conf
  384. ## Whether to enable ACL cache.
  385. ##
  386. ## If enabled, ACLs roles for each client will be cached in the memory
  387. ##
  388. ## Value: on | off
  389. enable_acl_cache = on
  390. ## The maximum count of ACL entries can be cached for a client.
  391. ##
  392. ## Value: Integer greater than 0
  393. ## Default: 32
  394. acl_cache_max_size = 32
  395. ## The time after which an ACL cache entry will be deleted
  396. ##
  397. ## Value: Duration
  398. ## Default: 1 minute
  399. acl_cache_ttl = 1m
  400. ## The action when acl check reject current operation
  401. ##
  402. ## Value: ignore | disconnect
  403. ## Default: ignore
  404. acl_deny_action = ignore
  405. ## The cleanning interval for flapping
  406. ##
  407. ## Value: Duration
  408. ## -d: day
  409. ## -h: hour
  410. ## -m: minute
  411. ## -s: second
  412. ##
  413. ## Default: 1h, 1 hour
  414. ## flapping_clean_interval = 1h
  415. ##--------------------------------------------------------------------
  416. ## MQTT Protocol
  417. ##--------------------------------------------------------------------
  418. ## Maximum MQTT packet size allowed.
  419. ##
  420. ## Value: Bytes
  421. ## Default: 1MB
  422. mqtt.max_packet_size = 1MB
  423. ## Maximum length of MQTT clientId allowed.
  424. ##
  425. ## Value: Number [23-65535]
  426. mqtt.max_clientid_len = 65535
  427. ## Maximum topic levels allowed. 0 means no limit.
  428. ##
  429. ## Value: Number
  430. mqtt.max_topic_levels = 0
  431. ## Maximum QoS allowed.
  432. ##
  433. ## Value: 0 | 1 | 2
  434. mqtt.max_qos_allowed = 2
  435. ## Maximum Topic Alias, 0 means no topic alias supported.
  436. ##
  437. ## Value: 0-65535
  438. mqtt.max_topic_alias = 0
  439. ## Whether the Server supports MQTT retained messages.
  440. ##
  441. ## Value: boolean
  442. mqtt.retain_available = true
  443. ## Whether the Server supports MQTT Wildcard Subscriptions
  444. ##
  445. ## Value: boolean
  446. mqtt.wildcard_subscription = true
  447. ## Whether the Server supports MQTT Shared Subscriptions.
  448. ##
  449. ## Value: boolean
  450. mqtt.shared_subscription = true
  451. ## Whether to ignore loop delivery of messages.(for mqtt v3.1.1)
  452. ##
  453. ## Value: true | false
  454. mqtt.ignore_loop_deliver = false
  455. ##--------------------------------------------------------------------
  456. ## Zones
  457. ##--------------------------------------------------------------------
  458. ##--------------------------------------------------------------------
  459. ## External Zone
  460. ## Idle timeout of the external MQTT connections.
  461. ##
  462. ## Value: duration
  463. zone.external.idle_timeout = 15s
  464. ## Publish limit for the external MQTT connections.
  465. ##
  466. ## Value: Number,Duration
  467. ## Example: 10 messages per minute.
  468. ## zone.external.publish_limit = 10,1m
  469. ## Enable ACL check.
  470. ##
  471. ## Value: Flag
  472. zone.external.enable_acl = on
  473. ## Enable ban check.
  474. ##
  475. ## Value: Flag
  476. zone.external.enable_ban = on
  477. ## Enable per connection statistics.
  478. ##
  479. ## Value: on | off
  480. zone.external.enable_stats = on
  481. ## The action when acl check reject current operation
  482. ##
  483. ## Value: ignore | disconnect
  484. ## Default: ignore
  485. zone.external.acl_deny_action = ignore
  486. ## Force MQTT connection/session process GC after this number of
  487. ## messages | bytes passed through.
  488. ##
  489. ## Numbers delimited by `|'. Zero or negative is to disable.
  490. zone.external.force_gc_policy = 1000|1MB
  491. ## Max message queue length and total heap size to force shutdown
  492. ## connection/session process.
  493. ## Message queue here is the Erlang process mailbox, but not the number
  494. ## of queued MQTT messages of QoS 1 and 2.
  495. ##
  496. ## Numbers delimited by `|'. Zero or negative is to disable.
  497. ##
  498. ## Default:
  499. ## - 8000|800MB on ARCH_64 system
  500. ## - 1000|100MB on ARCH_32 sytem
  501. ## zone.external.force_shutdown_policy = 8000|800MB
  502. ## Maximum MQTT packet size allowed.
  503. ##
  504. ## Value: Bytes
  505. ## Default: 1MB
  506. ## zone.external.max_packet_size = 64KB
  507. ## Maximum length of MQTT clientId allowed.
  508. ##
  509. ## Value: Number [23-65535]
  510. ## zone.external.max_clientid_len = 1024
  511. ## Maximum topic levels allowed. 0 means no limit.
  512. ##
  513. ## Value: Number
  514. ## zone.external.max_topic_levels = 7
  515. ## Maximum QoS allowed.
  516. ##
  517. ## Value: 0 | 1 | 2
  518. ## zone.external.max_qos_allowed = 2
  519. ## Maximum Topic Alias, 0 means no limit.
  520. ##
  521. ## Value: 0-65535
  522. ## zone.external.max_topic_alias = 0
  523. ## Whether the Server supports retained messages.
  524. ##
  525. ## Value: boolean
  526. ## zone.external.retain_available = true
  527. ## Whether the Server supports Wildcard Subscriptions
  528. ##
  529. ## Value: boolean
  530. ## zone.external.wildcard_subscription = false
  531. ## Whether the Server supports Shared Subscriptions
  532. ##
  533. ## Value: boolean
  534. ## zone.external.shared_subscription = false
  535. ## Server Keep Alive
  536. ##
  537. ## Value: Number
  538. ## zone.external.server_keepalive = 0
  539. ## The backoff for MQTT keepalive timeout. The broker will kick a connection out
  540. ## until 'Keepalive * backoff * 2' timeout.
  541. ##
  542. ## Value: Float > 0.5
  543. zone.external.keepalive_backoff = 0.75
  544. ## Maximum number of subscriptions allowed, 0 means no limit.
  545. ##
  546. ## Value: Number
  547. zone.external.max_subscriptions = 0
  548. ## Force to upgrade QoS according to subscription.
  549. ##
  550. ## Value: on | off
  551. zone.external.upgrade_qos = off
  552. ## Maximum size of the Inflight Window storing QoS1/2 messages delivered but unacked.
  553. ##
  554. ## Value: Number
  555. zone.external.max_inflight = 32
  556. ## Retry interval for QoS1/2 message delivering.
  557. ##
  558. ## Value: Duration
  559. zone.external.retry_interval = 20s
  560. ## Maximum QoS2 packets (Client -> Broker) awaiting PUBREL, 0 means no limit.
  561. ##
  562. ## Value: Number
  563. zone.external.max_awaiting_rel = 100
  564. ## The QoS2 messages (Client -> Broker) will be dropped if awaiting PUBREL timeout.
  565. ##
  566. ## Value: Duration
  567. zone.external.await_rel_timeout = 300s
  568. ## Default session expiry interval for MQTT V3.1.1 connections.
  569. ##
  570. ## Value: Duration
  571. ## -d: day
  572. ## -h: hour
  573. ## -m: minute
  574. ## -s: second
  575. ##
  576. ## Default: 2h, 2 hours
  577. zone.external.session_expiry_interval = 2h
  578. ## Maximum queue length. Enqueued messages when persistent client disconnected,
  579. ## or inflight window is full. 0 means no limit.
  580. ##
  581. ## Value: Number >= 0
  582. zone.external.max_mqueue_len = 1000
  583. ## Topic priorities.
  584. ## 'none' to indicate no priority table (by default), hence all messages
  585. ## are treated equal
  586. ##
  587. ## Priority number [1-255]
  588. ## Example: topic/1=10,topic/2=8
  589. ## NOTE: comma and equal signs are not allowed for priority topic names
  590. ## NOTE: messages for topics not in the priority table are treated as
  591. ## either highest or lowest priority depending on the configured
  592. ## value for mqueue_default_priority
  593. ##
  594. zone.external.mqueue_priorities = none
  595. ## Default to highest priority for topics not matching priority table
  596. ##
  597. ## Value: highest | lowest
  598. zone.external.mqueue_default_priority = highest
  599. ## Whether to enqueue QoS0 messages.
  600. ##
  601. ## Value: false | true
  602. zone.external.mqueue_store_qos0 = true
  603. ## Whether to turn on flapping detect
  604. ##
  605. ## Value: on | off
  606. zone.external.enable_flapping_detect = off
  607. ## The times of state change per min, specifying the threshold which is used to
  608. ## detect if the connection starts flapping
  609. ##
  610. ## Value: number
  611. zone.external.flapping_threshold = 10, 1m
  612. ## Flapping expiry interval for connections.
  613. ## This config entry is used to determine when the connection
  614. ## will be unbanned.
  615. ##
  616. ## Value: Duration
  617. ## -d: day
  618. ## -h: hour
  619. ## -m: minute
  620. ## -s: second
  621. ##
  622. ## Default: 1h, 1 hour
  623. zone.external.flapping_banned_expiry_interval = 1h
  624. ## All the topics will be prefixed with the mountpoint path if this option is enabled.
  625. ##
  626. ## Variables in mountpoint path:
  627. ## - %c: clientid
  628. ## - %u: username
  629. ##
  630. ## Value: String
  631. ## zone.external.mountpoint = devicebound/
  632. ## Whether use username replace client id
  633. ##
  634. ## Value: boolean
  635. ## Default: false
  636. zone.external.use_username_as_clientid = false
  637. ## Whether to ignore loop delivery of messages.(for mqtt v3.1.1)
  638. ##
  639. ## Value: true | false
  640. zone.external.ignore_loop_deliver = false
  641. ##--------------------------------------------------------------------
  642. ## Internal Zone
  643. zone.internal.allow_anonymous = true
  644. ## Enable per connection stats.
  645. ##
  646. ## Value: Flag
  647. zone.internal.enable_stats = on
  648. ## Enable ACL check.
  649. ##
  650. ## Value: Flag
  651. zone.internal.enable_acl = off
  652. ## The action when acl check reject current operation
  653. ##
  654. ## Value: ignore | disconnect
  655. ## Default: ignore
  656. zone.internal.acl_deny_action = ignore
  657. ## See zone.$name.wildcard_subscription.
  658. ##
  659. ## Value: boolean
  660. ## zone.internal.wildcard_subscription = true
  661. ## See zone.$name.shared_subscription.
  662. ##
  663. ## Value: boolean
  664. ## zone.internal.shared_subscription = true
  665. ## See zone.$name.max_subscriptions.
  666. ##
  667. ## Value: Integer
  668. zone.internal.max_subscriptions = 0
  669. ## See zone.$name.max_inflight
  670. ##
  671. ## Value: Number
  672. zone.internal.max_inflight = 32
  673. ## See zone.$name.max_awaiting_rel
  674. ##
  675. ## Value: Number
  676. zone.internal.max_awaiting_rel = 100
  677. ## See zone.$name.max_mqueue_len
  678. ##
  679. ## Value: Number >= 0
  680. zone.internal.max_mqueue_len = 1000
  681. ## Whether to enqueue Qos0 messages.
  682. ##
  683. ## Value: false | true
  684. zone.internal.mqueue_store_qos0 = true
  685. ## Whether to turn on flapping detect
  686. ##
  687. ## Value: on | off
  688. zone.internal.enable_flapping_detect = off
  689. ## The times of state change per second, specifying the threshold which is used to
  690. ## detect if the connection starts flapping
  691. ##
  692. ## Value: number
  693. zone.internal.flapping_threshold = 10, 1m
  694. ## Flapping expiry interval for connections.
  695. ## This config entry is used to determine when the connection
  696. ## will be unbanned.
  697. ##
  698. ## Value: Duration
  699. ## -d: day
  700. ## -h: hour
  701. ## -m: minute
  702. ## -s: second
  703. ##
  704. ## Default: 1h, 1 hour
  705. zone.internal.flapping_banned_expiry_interval = 1h
  706. ## All the topics will be prefixed with the mountpoint path if this option is enabled.
  707. ##
  708. ## Variables in mountpoint path:
  709. ## - %c: clientid
  710. ## - %u: username
  711. ##
  712. ## Value: String
  713. ## zone.internal.mountpoint = cloudbound/
  714. ## Whether use username replace client id
  715. ##
  716. ## Value: boolean
  717. ## Default: false
  718. zone.internal.use_username_as_clientid = false
  719. ## Whether to ignore loop delivery of messages.(for mqtt v3.1.1)
  720. ##
  721. ## Value: true | false
  722. zone.internal.ignore_loop_deliver = false
  723. ##--------------------------------------------------------------------
  724. ## Listeners
  725. ##--------------------------------------------------------------------
  726. ##--------------------------------------------------------------------
  727. ## MQTT/TCP - External TCP Listener for MQTT Protocol
  728. ## listener.tcp.$name is the IP address and port that the MQTT/TCP
  729. ## listener will bind.
  730. ##
  731. ## Value: IP:Port | Port
  732. ##
  733. ## Examples: 1883, 127.0.0.1:1883, ::1:1883
  734. listener.tcp.external = 0.0.0.0:1883
  735. ## The acceptor pool for external MQTT/TCP listener.
  736. ##
  737. ## Value: Number
  738. listener.tcp.external.acceptors = 8
  739. ## Maximum number of concurrent MQTT/TCP connections.
  740. ##
  741. ## Value: Number
  742. listener.tcp.external.max_connections = 1024000
  743. ## Maximum external connections per second.
  744. ##
  745. ## Value: Number
  746. listener.tcp.external.max_conn_rate = 1000
  747. ## Specify the {active, N} option for the external MQTT/TCP Socket.
  748. ##
  749. ## Value: Number
  750. listener.tcp.external.active_n = 100
  751. ## Zone of the external MQTT/TCP listener belonged to.
  752. ##
  753. ## See: zone.$name.*
  754. ##
  755. ## Value: String
  756. listener.tcp.external.zone = external
  757. ## Rate limit for the external MQTT/TCP connections. Format is 'rate,burst'.
  758. ##
  759. ## Value: rate,burst
  760. ## - rate: The average limit value for per second
  761. ## - burst: The maximum allowed for each check, To avoid frequent restriction
  762. ## this value is recommended to be set to `(max_packet_size * active_n)/2`
  763. ## Unit: Bps
  764. ## listener.tcp.external.rate_limit = 1024,52428800
  765. ## The access control rules for the MQTT/TCP listener.
  766. ##
  767. ## See: https://github.com/emqtt/esockd#allowdeny
  768. ##
  769. ## Value: ACL Rule
  770. ##
  771. ## Example: allow 192.168.0.0/24
  772. listener.tcp.external.access.1 = allow all
  773. ## Enable the Proxy Protocol V1/2 if the EMQ X cluster is deployed
  774. ## behind HAProxy or Nginx.
  775. ##
  776. ## See: https://www.haproxy.com/blog/haproxy/proxy-protocol/
  777. ##
  778. ## Value: on | off
  779. ## listener.tcp.external.proxy_protocol = on
  780. ## Sets the timeout for proxy protocol. EMQ X will close the TCP connection
  781. ## if no proxy protocol packet recevied within the timeout.
  782. ##
  783. ## Value: Duration
  784. ## listener.tcp.external.proxy_protocol_timeout = 3s
  785. ## Enable the option for X.509 certificate based authentication.
  786. ## EMQX will use the common name of certificate as MQTT username.
  787. ##
  788. ## Value: cn | dn
  789. ## listener.tcp.external.peer_cert_as_username = cn
  790. ## The TCP backlog defines the maximum length that the queue of pending
  791. ## connections can grow to.
  792. ##
  793. ## Value: Number >= 0
  794. listener.tcp.external.backlog = 1024
  795. ## The TCP send timeout for external MQTT connections.
  796. ##
  797. ## Value: Duration
  798. listener.tcp.external.send_timeout = 15s
  799. ## Close the TCP connection if send timeout.
  800. ##
  801. ## Value: on | off
  802. listener.tcp.external.send_timeout_close = on
  803. ## The TCP receive buffer(os kernel) for MQTT connections.
  804. ##
  805. ## See: http://erlang.org/doc/man/inet.html
  806. ##
  807. ## Value: Bytes
  808. ## listener.tcp.external.recbuf = 2KB
  809. ## The TCP send buffer(os kernel) for MQTT connections.
  810. ##
  811. ## See: http://erlang.org/doc/man/inet.html
  812. ##
  813. ## Value: Bytes
  814. ## listener.tcp.external.sndbuf = 2KB
  815. ## The size of the user-level software buffer used by the driver.
  816. ## Not to be confused with options sndbuf and recbuf, which correspond
  817. ## to the Kernel socket buffers. It is recommended to have val(buffer)
  818. ## >= max(val(sndbuf),val(recbuf)) to avoid performance issues because
  819. ## of unnecessary copying. val(buffer) is automatically set to the above
  820. ## maximum when values sndbuf or recbuf are set.
  821. ##
  822. ## See: http://erlang.org/doc/man/inet.html
  823. ##
  824. ## Value: Bytes
  825. ## listener.tcp.external.buffer = 2KB
  826. ## Sets the 'buffer = max(sndbuf, recbuf)' if this option is enabled.
  827. ##
  828. ## Value: on | off
  829. ## listener.tcp.external.tune_buffer = off
  830. ## The TCP_NODELAY flag for MQTT connections. Small amounts of data are
  831. ## sent immediately if the option is enabled.
  832. ##
  833. ## Value: true | false
  834. listener.tcp.external.nodelay = true
  835. ## The SO_REUSEADDR flag for TCP listener.
  836. ##
  837. ## Value: true | false
  838. listener.tcp.external.reuseaddr = true
  839. ##--------------------------------------------------------------------
  840. ## Internal TCP Listener for MQTT Protocol
  841. ## The IP address and port that the internal MQTT/TCP protocol listener
  842. ## will bind.
  843. ##
  844. ## Value: IP:Port, Port
  845. ##
  846. ## Examples: 11883, 127.0.0.1:11883, ::1:11883
  847. listener.tcp.internal = 127.0.0.1:11883
  848. ## The acceptor pool for internal MQTT/TCP listener.
  849. ##
  850. ## Value: Number
  851. listener.tcp.internal.acceptors = 4
  852. ## Maximum number of concurrent MQTT/TCP connections.
  853. ##
  854. ## Value: Number
  855. listener.tcp.internal.max_connections = 1024000
  856. ## Maximum internal connections per second.
  857. ##
  858. ## Value: Number
  859. listener.tcp.internal.max_conn_rate = 1000
  860. ## Specify the {active, N} option for the internal MQTT/TCP Socket.
  861. ##
  862. ## Value: Number
  863. listener.tcp.internal.active_n = 1000
  864. ## Zone of the internal MQTT/TCP listener belonged to.
  865. ##
  866. ## Value: String
  867. listener.tcp.internal.zone = internal
  868. ## Rate limit for the internal MQTT/TCP connections.
  869. ##
  870. ## See: listener.tcp.$name.rate_limit
  871. ##
  872. ## Value: rate,burst
  873. ## - rate: The average limit value for per second
  874. ## - burst: The maximum allowed for each check, To avoid frequent restriction
  875. ## this value is recommended to be set to `(max_packet_size * active_n)/2`
  876. ## Unit: Bps
  877. ## listener.tcp.internal.rate_limit = 1000000,524288000
  878. ## The TCP backlog of internal MQTT/TCP Listener.
  879. ##
  880. ## See: listener.tcp.$name.backlog
  881. ##
  882. ## Value: Number >= 0
  883. listener.tcp.internal.backlog = 512
  884. ## The TCP send timeout for internal MQTT connections.
  885. ##
  886. ## See: listener.tcp.$name.send_timeout
  887. ##
  888. ## Value: Duration
  889. listener.tcp.internal.send_timeout = 5s
  890. ## Close the MQTT/TCP connection if send timeout.
  891. ##
  892. ## See: listener.tcp.$name.send_timeout_close
  893. ##
  894. ## Value: on | off
  895. listener.tcp.internal.send_timeout_close = on
  896. ## The TCP receive buffer(os kernel) for internal MQTT connections.
  897. ##
  898. ## See: listener.tcp.$name.recbuf
  899. ##
  900. ## Value: Bytes
  901. ## listener.tcp.internal.recbuf = 16KB
  902. ## The TCP send buffer(os kernel) for internal MQTT connections.
  903. ##
  904. ## See: http://erlang.org/doc/man/inet.html
  905. ##
  906. ## Value: Bytes
  907. ## listener.tcp.internal.sndbuf = 16KB
  908. ## The size of the user-level software buffer used by the driver.
  909. ##
  910. ## See: listener.tcp.$name.buffer
  911. ##
  912. ## Value: Bytes
  913. ## listener.tcp.internal.buffer = 16KB
  914. ## Sets the 'buffer = max(sndbuf, recbuf)' if this option is enabled.
  915. ##
  916. ## See: listener.tcp.$name.tune_buffer
  917. ##
  918. ## Value: on | off
  919. ## listener.tcp.internal.tune_buffer = off
  920. ## The TCP_NODELAY flag for internal MQTT connections.
  921. ##
  922. ## See: listener.tcp.$name.nodelay
  923. ##
  924. ## Value: true | false
  925. listener.tcp.internal.nodelay = false
  926. ## The SO_REUSEADDR flag for MQTT/TCP Listener.
  927. ##
  928. ## Value: true | false
  929. listener.tcp.internal.reuseaddr = true
  930. ##--------------------------------------------------------------------
  931. ## MQTT/SSL - External SSL Listener for MQTT Protocol
  932. ## listener.ssl.$name is the IP address and port that the MQTT/SSL
  933. ## listener will bind.
  934. ##
  935. ## Value: IP:Port | Port
  936. ##
  937. ## Examples: 8883, 127.0.0.1:8883, ::1:8883
  938. listener.ssl.external = 8883
  939. ## The acceptor pool for external MQTT/SSL listener.
  940. ##
  941. ## Value: Number
  942. listener.ssl.external.acceptors = 16
  943. ## Maximum number of concurrent MQTT/SSL connections.
  944. ##
  945. ## Value: Number
  946. listener.ssl.external.max_connections = 102400
  947. ## Maximum MQTT/SSL connections per second.
  948. ##
  949. ## Value: Number
  950. listener.ssl.external.max_conn_rate = 500
  951. ## Specify the {active, N} option for the internal MQTT/SSL Socket.
  952. ##
  953. ## Value: Number
  954. listener.ssl.external.active_n = 100
  955. ## Zone of the external MQTT/SSL listener belonged to.
  956. ##
  957. ## Value: String
  958. listener.ssl.external.zone = external
  959. ## The access control rules for the MQTT/SSL listener.
  960. ##
  961. ## See: listener.tcp.$name.access
  962. ##
  963. ## Value: ACL Rule
  964. listener.ssl.external.access.1 = allow all
  965. ## Rate limit for the external MQTT/SSL connections.
  966. ##
  967. ## Value: rate,burst
  968. ## - rate: The average limit value for per second
  969. ## - burst: The maximum allowed for each check, To avoid frequent restriction
  970. ## this value is recommended to be set to `(max_packet_size * active_n)/2`
  971. ## Unit: Bps
  972. ## listener.ssl.external.rate_limit = 1024,52428800
  973. ## Enable the Proxy Protocol V1/2 if the EMQ cluster is deployed behind
  974. ## HAProxy or Nginx.
  975. ##
  976. ## See: listener.tcp.$name.proxy_protocol
  977. ##
  978. ## Value: on | off
  979. ## listener.ssl.external.proxy_protocol = on
  980. ## Sets the timeout for proxy protocol.
  981. ##
  982. ## See: listener.tcp.$name.proxy_protocol_timeout
  983. ##
  984. ## Value: Duration
  985. ## listener.ssl.external.proxy_protocol_timeout = 3s
  986. ## TLS versions only to protect from POODLE attack.
  987. ##
  988. ## See: http://erlang.org/doc/man/ssl.html
  989. ##
  990. ## Value: String, seperated by ','
  991. ## listener.ssl.external.tls_versions = tlsv1.2,tlsv1.1,tlsv1
  992. ## TLS Handshake timeout.
  993. ##
  994. ## Value: Duration
  995. listener.ssl.external.handshake_timeout = 15s
  996. ## Path to the file containing the user's private PEM-encoded key.
  997. ##
  998. ## See: http://erlang.org/doc/man/ssl.html
  999. ##
  1000. ## Value: File
  1001. listener.ssl.external.keyfile = {{ platform_etc_dir }}/certs/key.pem
  1002. ## Path to a file containing the user certificate.
  1003. ##
  1004. ## See: http://erlang.org/doc/man/ssl.html
  1005. ##
  1006. ## Value: File
  1007. listener.ssl.external.certfile = {{ platform_etc_dir }}/certs/cert.pem
  1008. ## Path to the file containing PEM-encoded CA certificates. The CA certificates
  1009. ## are used during server authentication and when building the client certificate chain.
  1010. ##
  1011. ## Value: File
  1012. ## listener.ssl.external.cacertfile = {{ platform_etc_dir }}/certs/cacert.pem
  1013. ## The Ephemeral Diffie-Helman key exchange is a very effective way of
  1014. ## ensuring Forward Secrecy by exchanging a set of keys that never hit
  1015. ## the wire. Since the DH key is effectively signed by the private key,
  1016. ## it needs to be at least as strong as the private key. In addition,
  1017. ## the default DH groups that most of the OpenSSL installations have
  1018. ## are only a handful (since they are distributed with the OpenSSL
  1019. ## package that has been built for the operating system it’s running on)
  1020. ## and hence predictable (not to mention, 1024 bits only).
  1021. ## In order to escape this situation, first we need to generate a fresh,
  1022. ## strong DH group, store it in a file and then use the option above,
  1023. ## to force our SSL application to use the new DH group. Fortunately,
  1024. ## OpenSSL provides us with a tool to do that. Simply run:
  1025. ## openssl dhparam -out dh-params.pem 2048
  1026. ##
  1027. ## Value: File
  1028. ## listener.ssl.external.dhfile = {{ platform_etc_dir }}/certs/dh-params.pem
  1029. ## A server only does x509-path validation in mode verify_peer,
  1030. ## as it then sends a certificate request to the client (this
  1031. ## message is not sent if the verify option is verify_none).
  1032. ## You can then also want to specify option fail_if_no_peer_cert.
  1033. ## More information at: http://erlang.org/doc/man/ssl.html
  1034. ##
  1035. ## Value: verify_peer | verify_none
  1036. ## listener.ssl.external.verify = verify_peer
  1037. ## Used together with {verify, verify_peer} by an SSL server. If set to true,
  1038. ## the server fails if the client does not have a certificate to send, that is,
  1039. ## sends an empty certificate.
  1040. ##
  1041. ## Value: true | false
  1042. ## listener.ssl.external.fail_if_no_peer_cert = true
  1043. ## This is the single most important configuration option of an Erlang SSL
  1044. ## application. Ciphers (and their ordering) define the way the client and
  1045. ## server encrypt information over the wire, from the initial Diffie-Helman
  1046. ## key exchange, the session key encryption ## algorithm and the message
  1047. ## digest algorithm. Selecting a good cipher suite is critical for the
  1048. ## application’s data security, confidentiality and performance.
  1049. ##
  1050. ## The cipher list above offers:
  1051. ##
  1052. ## A good balance between compatibility with older browsers.
  1053. ## It can get stricter for Machine-To-Machine scenarios.
  1054. ## Perfect Forward Secrecy.
  1055. ## No old/insecure encryption and HMAC algorithms
  1056. ##
  1057. ## Most of it was copied from Mozilla’s Server Side TLS article
  1058. ##
  1059. ## Value: Ciphers
  1060. listener.ssl.external.ciphers = ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384,ECDHE-ECDSA-AES256-SHA384,ECDHE-RSA-AES256-SHA384,ECDHE-ECDSA-DES-CBC3-SHA,ECDH-ECDSA-AES256-GCM-SHA384,ECDH-RSA-AES256-GCM-SHA384,ECDH-ECDSA-AES256-SHA384,ECDH-RSA-AES256-SHA384,DHE-DSS-AES256-GCM-SHA384,DHE-DSS-AES256-SHA256,AES256-GCM-SHA384,AES256-SHA256,ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256,ECDHE-ECDSA-AES128-SHA256,ECDHE-RSA-AES128-SHA256,ECDH-ECDSA-AES128-GCM-SHA256,ECDH-RSA-AES128-GCM-SHA256,ECDH-ECDSA-AES128-SHA256,ECDH-RSA-AES128-SHA256,DHE-DSS-AES128-GCM-SHA256,DHE-DSS-AES128-SHA256,AES128-GCM-SHA256,AES128-SHA256,ECDHE-ECDSA-AES256-SHA,ECDHE-RSA-AES256-SHA,DHE-DSS-AES256-SHA,ECDH-ECDSA-AES256-SHA,ECDH-RSA-AES256-SHA,AES256-SHA,ECDHE-ECDSA-AES128-SHA,ECDHE-RSA-AES128-SHA,DHE-DSS-AES128-SHA,ECDH-ECDSA-AES128-SHA,ECDH-RSA-AES128-SHA,AES128-SHA
  1061. ## Ciphers for TLS PSK.
  1062. ## Note that 'listener.ssl.external.ciphers' and 'listener.ssl.external.psk_ciphers' cannot
  1063. ## be configured at the same time.
  1064. ## See 'https://tools.ietf.org/html/rfc4279#section-2'.
  1065. #listener.ssl.external.psk_ciphers = PSK-AES128-CBC-SHA,PSK-AES256-CBC-SHA,PSK-3DES-EDE-CBC-SHA,PSK-RC4-SHA
  1066. ## SSL parameter renegotiation is a feature that allows a client and a server
  1067. ## to renegotiate the parameters of the SSL connection on the fly.
  1068. ## RFC 5746 defines a more secure way of doing this. By enabling secure renegotiation,
  1069. ## you drop support for the insecure renegotiation, prone to MitM attacks.
  1070. ##
  1071. ## Value: on | off
  1072. ## listener.ssl.external.secure_renegotiate = off
  1073. ## A performance optimization setting, it allows clients to reuse
  1074. ## pre-existing sessions, instead of initializing new ones.
  1075. ## Read more about it here.
  1076. ##
  1077. ## See: http://erlang.org/doc/man/ssl.html
  1078. ##
  1079. ## Value: on | off
  1080. ## listener.ssl.external.reuse_sessions = on
  1081. ## An important security setting, it forces the cipher to be set based
  1082. ## on the server-specified order instead of the client-specified order,
  1083. ## hence enforcing the (usually more properly configured) security
  1084. ## ordering of the server administrator.
  1085. ##
  1086. ## Value: on | off
  1087. ## listener.ssl.external.honor_cipher_order = on
  1088. ## Use the CN, EN or CRT field from the client certificate as a username.
  1089. ## Notice that 'verify' should be set as 'verify_peer'.
  1090. ##
  1091. ## Value: cn | en | crt
  1092. ## listener.ssl.external.peer_cert_as_username = cn
  1093. ## TCP backlog for the SSL connection.
  1094. ##
  1095. ## See listener.tcp.$name.backlog
  1096. ##
  1097. ## Value: Number >= 0
  1098. ## listener.ssl.external.backlog = 1024
  1099. ## The TCP send timeout for the SSL connection.
  1100. ##
  1101. ## See listener.tcp.$name.send_timeout
  1102. ##
  1103. ## Value: Duration
  1104. ## listener.ssl.external.send_timeout = 15s
  1105. ## Close the SSL connection if send timeout.
  1106. ##
  1107. ## See: listener.tcp.$name.send_timeout_close
  1108. ##
  1109. ## Value: on | off
  1110. ## listener.ssl.external.send_timeout_close = on
  1111. ## The TCP receive buffer(os kernel) for the SSL connections.
  1112. ##
  1113. ## See: listener.tcp.$name.recbuf
  1114. ##
  1115. ## Value: Bytes
  1116. ## listener.ssl.external.recbuf = 4KB
  1117. ## The TCP send buffer(os kernel) for internal MQTT connections.
  1118. ##
  1119. ## See: listener.tcp.$name.sndbuf
  1120. ##
  1121. ## Value: Bytes
  1122. ## listener.ssl.external.sndbuf = 4KB
  1123. ## The size of the user-level software buffer used by the driver.
  1124. ##
  1125. ## See: listener.tcp.$name.buffer
  1126. ##
  1127. ## Value: Bytes
  1128. ## listener.ssl.external.buffer = 4KB
  1129. ## Sets the 'buffer = max(sndbuf, recbuf)' if this option is enabled.
  1130. ##
  1131. ## See: listener.tcp.$name.tune_buffer
  1132. ##
  1133. ## Value: on | off
  1134. ## listener.ssl.external.tune_buffer = off
  1135. ## The TCP_NODELAY flag for SSL connections.
  1136. ##
  1137. ## See: listener.tcp.$name.nodelay
  1138. ##
  1139. ## Value: true | false
  1140. ## listener.ssl.external.nodelay = true
  1141. ## The SO_REUSEADDR flag for MQTT/SSL Listener.
  1142. ##
  1143. ## Value: true | false
  1144. listener.ssl.external.reuseaddr = true
  1145. ##--------------------------------------------------------------------
  1146. ## External WebSocket listener for MQTT protocol
  1147. ## listener.ws.$name is the IP address and port that the MQTT/WebSocket
  1148. ## listener will bind.
  1149. ##
  1150. ## Value: IP:Port | Port
  1151. ##
  1152. ## Examples: 8083, 127.0.0.1:8083, ::1:8083
  1153. listener.ws.external = 8083
  1154. ## The path of WebSocket MQTT endpoint
  1155. ##
  1156. ## Value: URL Path
  1157. listener.ws.external.mqtt_path = /mqtt
  1158. ## The acceptor pool for external MQTT/WebSocket listener.
  1159. ##
  1160. ## Value: Number
  1161. listener.ws.external.acceptors = 4
  1162. ## Maximum number of concurrent MQTT/WebSocket connections.
  1163. ##
  1164. ## Value: Number
  1165. listener.ws.external.max_connections = 102400
  1166. ## Maximum MQTT/WebSocket connections per second.
  1167. ##
  1168. ## Value: Number
  1169. listener.ws.external.max_conn_rate = 1000
  1170. ## Rate limit for the MQTT/WebSocket connections.
  1171. ##
  1172. ## Value: rate,burst
  1173. ## - rate: The average limit value for per second
  1174. ## - burst: The maximum allowed for each check, To avoid frequent restriction
  1175. ## this value is recommended to be set to `(max_packet_size * 1)/2`
  1176. ## Unit: Bps
  1177. ## listener.ws.external.rate_limit = 1024,524288
  1178. ## Zone of the external MQTT/WebSocket listener belonged to.
  1179. ##
  1180. ## Value: String
  1181. listener.ws.external.zone = external
  1182. ## The access control for the MQTT/WebSocket listener.
  1183. ##
  1184. ## See: listener.ws.$name.access
  1185. ##
  1186. ## Value: ACL Rule
  1187. listener.ws.external.access.1 = allow all
  1188. ## Verify if the protocol header is valid. Turn off for WeChat MiniApp.
  1189. ##
  1190. ## Value: on | off
  1191. listener.ws.external.verify_protocol_header = on
  1192. ## Use X-Forwarded-For header for real source IP if the EMQ X cluster is
  1193. ## deployed behind NGINX or HAProxy.
  1194. ##
  1195. ## Value: String
  1196. ## listener.ws.external.proxy_address_header = X-Forwarded-For
  1197. ## Use X-Forwarded-Port header for real source port if the EMQ X cluster is
  1198. ## deployed behind NGINX or HAProxy.
  1199. ##
  1200. ## Value: String
  1201. ## listener.ws.external.proxy_port_header = X-Forwarded-Port
  1202. ## Enable the Proxy Protocol V1/2 if the EMQ cluster is deployed behind
  1203. ## HAProxy or Nginx.
  1204. ##
  1205. ## See: listener.ws.$name.proxy_protocol
  1206. ##
  1207. ## Value: on | off
  1208. ## listener.ws.external.proxy_protocol = on
  1209. ## Sets the timeout for proxy protocol.
  1210. ##
  1211. ## See: listener.ws.$name.proxy_protocol_timeout
  1212. ##
  1213. ## Value: Duration
  1214. ## listener.ws.external.proxy_protocol_timeout = 3s
  1215. ## The TCP backlog of external MQTT/WebSocket Listener.
  1216. ##
  1217. ## See: listener.ws.$name.backlog
  1218. ##
  1219. ## Value: Number >= 0
  1220. listener.ws.external.backlog = 1024
  1221. ## The TCP send timeout for external MQTT/WebSocket connections.
  1222. ##
  1223. ## See: listener.ws.$name.send_timeout
  1224. ##
  1225. ## Value: Duration
  1226. listener.ws.external.send_timeout = 15s
  1227. ## Close the MQTT/WebSocket connection if send timeout.
  1228. ##
  1229. ## See: listener.ws.$name.send_timeout_close
  1230. ##
  1231. ## Value: on | off
  1232. listener.ws.external.send_timeout_close = on
  1233. ## The TCP receive buffer(os kernel) for external MQTT/WebSocket connections.
  1234. ##
  1235. ## See: listener.ws.$name.recbuf
  1236. ##
  1237. ## Value: Bytes
  1238. ## listener.ws.external.recbuf = 2KB
  1239. ## The TCP send buffer(os kernel) for external MQTT/WebSocket connections.
  1240. ##
  1241. ## See: listener.ws.$name.sndbuf
  1242. ##
  1243. ## Value: Bytes
  1244. ## listener.ws.external.sndbuf = 2KB
  1245. ## The size of the user-level software buffer used by the driver.
  1246. ##
  1247. ## See: listener.ws.$name.buffer
  1248. ##
  1249. ## Value: Bytes
  1250. ## listener.ws.external.buffer = 2KB
  1251. ## Sets the 'buffer = max(sndbuf, recbuf)' if this option is enabled.
  1252. ##
  1253. ## See: listener.ws.$name.tune_buffer
  1254. ##
  1255. ## Value: on | off
  1256. ## listener.ws.external.tune_buffer = off
  1257. ## The TCP_NODELAY flag for external MQTT/WebSocket connections.
  1258. ##
  1259. ## See: listener.ws.$name.nodelay
  1260. ##
  1261. ## Value: true | false
  1262. listener.ws.external.nodelay = true
  1263. ## The compress flag for external MQTT/WebSocket connections.
  1264. ##
  1265. ## If this Value is set true,the websocket message would be compressed
  1266. ##
  1267. ## Value: true | false
  1268. ## listener.ws.external.compress = true
  1269. ## The level of deflate options for external MQTT/WebSocket connections.
  1270. ##
  1271. ## See: listener.ws.$name.deflate_opts.level
  1272. ##
  1273. ## Value: none | default | best_compression | best_speed
  1274. ## listener.ws.external.deflate_opts.level = default
  1275. ## The mem_level of deflate options for external MQTT/WebSocket connections.
  1276. ##
  1277. ## See: listener.ws.$name.deflate_opts.mem_level
  1278. ##
  1279. ## Valid range is 1-9
  1280. ## listener.ws.external.deflate_opts.mem_level = 8
  1281. ## The strategy of deflate options for external MQTT/WebSocket connections.
  1282. ##
  1283. ## See: listener.ws.$name.deflate_opts.strategy
  1284. ##
  1285. ## Value: default | filtered | huffman_only | rle
  1286. ## listener.ws.external.deflate_opts.strategy = default
  1287. ## The deflate option for external MQTT/WebSocket connections.
  1288. ##
  1289. ## See: listener.ws.$name.deflate_opts.server_context_takeover
  1290. ##
  1291. ## Value: takeover | no_takeover
  1292. ## listener.ws.external.deflate_opts.server_context_takeover = takeover
  1293. ## The deflate option for external MQTT/WebSocket connections.
  1294. ##
  1295. ## See: listener.ws.$name.deflate_opts.client_context_takeover
  1296. ##
  1297. ## Value: takeover | no_takeover
  1298. ## listener.ws.external.deflate_opts.client_context_takeover = takeover
  1299. ## The deflate options for external MQTT/WebSocket connections.
  1300. ##
  1301. ## See: listener.ws.$name.deflate_opts.server_max_window_bits
  1302. ##
  1303. ## Valid range is 8-15
  1304. ## listener.ws.external.deflate_opts.server_max_window_bits = 15
  1305. ## The deflate options for external MQTT/WebSocket connections.
  1306. ##
  1307. ## See: listener.ws.$name.deflate_opts.client_max_window_bits
  1308. ##
  1309. ## Valid range is 8-15
  1310. ## listener.ws.external.deflate_opts.client_max_window_bits = 15
  1311. ## The idle timeout for external MQTT/WebSocket connections.
  1312. ##
  1313. ## See: listener.ws.$name.idle_timeout
  1314. ##
  1315. ## Value: Duration
  1316. ## listener.ws.external.idle_timeout = 60s
  1317. ## The max frame size for external MQTT/WebSocket connections.
  1318. ##
  1319. ##
  1320. ## Value: Number
  1321. ## listener.ws.external.max_frame_size = 0
  1322. ##--------------------------------------------------------------------
  1323. ## External WebSocket/SSL listener for MQTT Protocol
  1324. ## listener.wss.$name is the IP address and port that the MQTT/WebSocket/SSL
  1325. ## listener will bind.
  1326. ##
  1327. ## Value: IP:Port | Port
  1328. ##
  1329. ## Examples: 8084, 127.0.0.1:8084, ::1:8084
  1330. listener.wss.external = 8084
  1331. ## The path of WebSocket MQTT endpoint
  1332. ##
  1333. ## Value: URL Path
  1334. listener.wss.external.mqtt_path = /mqtt
  1335. ## The acceptor pool for external MQTT/WebSocket/SSL listener.
  1336. ##
  1337. ## Value: Number
  1338. listener.wss.external.acceptors = 4
  1339. ## Maximum number of concurrent MQTT/Webwocket/SSL connections.
  1340. ##
  1341. ## Value: Number
  1342. listener.wss.external.max_connections = 16
  1343. ## Maximum MQTT/WebSocket/SSL connections per second.
  1344. ##
  1345. ## See: listener.tcp.$name.max_conn_rate
  1346. ##
  1347. ## Value: Number
  1348. listener.wss.external.max_conn_rate = 1000
  1349. ## Rate limit for the MQTT/WebSocket/SSL connections.
  1350. ##
  1351. ## Value: rate,burst
  1352. ## - rate: The average limit value for per second
  1353. ## - burst: The maximum allowed for each check, To avoid frequent restriction
  1354. ## this value is recommended to be set to `(max_packet_size * 1)/2`
  1355. ## Unit: Bps
  1356. ## listener.wss.external.rate_limit = 1024,524288
  1357. ## Zone of the external MQTT/WebSocket/SSL listener belonged to.
  1358. ##
  1359. ## Value: String
  1360. listener.wss.external.zone = external
  1361. ## The access control rules for the MQTT/WebSocket/SSL listener.
  1362. ##
  1363. ## See: listener.tcp.$name.access.<no>
  1364. ##
  1365. ## Value: ACL Rule
  1366. listener.wss.external.access.1 = allow all
  1367. ## See: listener.ws.external.verify_protocol_header
  1368. ##
  1369. ## Value: on | off
  1370. listener.wss.external.verify_protocol_header = on
  1371. ## See: listener.ws.external.proxy_address_header
  1372. ##
  1373. ## Value: String
  1374. ## listener.wss.external.proxy_address_header = X-Forwarded-For
  1375. ## See: listener.ws.external.proxy_port_header
  1376. ##
  1377. ## Value: String
  1378. ## listener.wss.external.proxy_port_header = X-Forwarded-Port
  1379. ## Enable the Proxy Protocol V1/2 support.
  1380. ##
  1381. ## See: listener.tcp.$name.proxy_protocol
  1382. ##
  1383. ## Value: on | off
  1384. ## listener.wss.external.proxy_protocol = on
  1385. ## Sets the timeout for proxy protocol.
  1386. ##
  1387. ## See: listener.tcp.$name.proxy_protocol_timeout
  1388. ##
  1389. ## Value: Duration
  1390. ## listener.wss.external.proxy_protocol_timeout = 3s
  1391. ## TLS versions only to protect from POODLE attack.
  1392. ##
  1393. ## See: listener.ssl.$name.tls_versions
  1394. ##
  1395. ## Value: String, seperated by ','
  1396. ## listener.wss.external.tls_versions = tlsv1.2,tlsv1.1,tlsv1
  1397. ## Path to the file containing the user's private PEM-encoded key.
  1398. ##
  1399. ## See: listener.ssl.$name.keyfile
  1400. ##
  1401. ## Value: File
  1402. listener.wss.external.keyfile = {{ platform_etc_dir }}/certs/key.pem
  1403. ## Path to a file containing the user certificate.
  1404. ##
  1405. ## See: listener.ssl.$name.certfile
  1406. ##
  1407. ## Value: File
  1408. listener.wss.external.certfile = {{ platform_etc_dir }}/certs/cert.pem
  1409. ## Path to the file containing PEM-encoded CA certificates.
  1410. ##
  1411. ## See: listener.ssl.$name.cacert
  1412. ##
  1413. ## Value: File
  1414. ## listener.wss.external.cacertfile = {{ platform_etc_dir }}/certs/cacert.pem
  1415. ## See: listener.ssl.$name.dhfile
  1416. ##
  1417. ## Value: File
  1418. ## listener.ssl.external.dhfile = {{ platform_etc_dir }}/certs/dh-params.pem
  1419. ## See: listener.ssl.$name.vefify
  1420. ##
  1421. ## Value: vefify_peer | verify_none
  1422. ## listener.wss.external.verify = verify_peer
  1423. ## See: listener.ssl.$name.fail_if_no_peer_cert
  1424. ##
  1425. ## Value: false | true
  1426. ## listener.wss.external.fail_if_no_peer_cert = true
  1427. ## See: listener.ssl.$name.ciphers
  1428. ##
  1429. ## Value: Ciphers
  1430. listener.wss.external.ciphers = ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384,ECDHE-ECDSA-AES256-SHA384,ECDHE-RSA-AES256-SHA384,ECDHE-ECDSA-DES-CBC3-SHA,ECDH-ECDSA-AES256-GCM-SHA384,ECDH-RSA-AES256-GCM-SHA384,ECDH-ECDSA-AES256-SHA384,ECDH-RSA-AES256-SHA384,DHE-DSS-AES256-GCM-SHA384,DHE-DSS-AES256-SHA256,AES256-GCM-SHA384,AES256-SHA256,ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256,ECDHE-ECDSA-AES128-SHA256,ECDHE-RSA-AES128-SHA256,ECDH-ECDSA-AES128-GCM-SHA256,ECDH-RSA-AES128-GCM-SHA256,ECDH-ECDSA-AES128-SHA256,ECDH-RSA-AES128-SHA256,DHE-DSS-AES128-GCM-SHA256,DHE-DSS-AES128-SHA256,AES128-GCM-SHA256,AES128-SHA256,ECDHE-ECDSA-AES256-SHA,ECDHE-RSA-AES256-SHA,DHE-DSS-AES256-SHA,ECDH-ECDSA-AES256-SHA,ECDH-RSA-AES256-SHA,AES256-SHA,ECDHE-ECDSA-AES128-SHA,ECDHE-RSA-AES128-SHA,DHE-DSS-AES128-SHA,ECDH-ECDSA-AES128-SHA,ECDH-RSA-AES128-SHA,AES128-SHA
  1431. ## Ciphers for TLS PSK.
  1432. ## Note that 'listener.wss.external.ciphers' and 'listener.wss.external.psk_ciphers' cannot
  1433. ## be configured at the same time.
  1434. ## See 'https://tools.ietf.org/html/rfc4279#section-2'.
  1435. ## listener.wss.external.psk_ciphers = PSK-AES128-CBC-SHA,PSK-AES256-CBC-SHA,PSK-3DES-EDE-CBC-SHA,PSK-RC4-SHA
  1436. ## See: listener.ssl.$name.secure_renegotiate
  1437. ##
  1438. ## Value: on | off
  1439. ## listener.wss.external.secure_renegotiate = off
  1440. ## See: listener.ssl.$name.reuse_sessions
  1441. ##
  1442. ## Value: on | off
  1443. ## listener.wss.external.reuse_sessions = on
  1444. ## See: listener.ssl.$name.honor_cipher_order
  1445. ##
  1446. ## Value: on | off
  1447. ## listener.wss.external.honor_cipher_order = on
  1448. ## See: listener.ssl.$name.peer_cert_as_username
  1449. ##
  1450. ## Value: cn | dn | crt
  1451. ## listener.wss.external.peer_cert_as_username = cn
  1452. ## TCP backlog for the WebSocket/SSL connection.
  1453. ##
  1454. ## See: listener.tcp.$name.backlog
  1455. ##
  1456. ## Value: Number >= 0
  1457. listener.wss.external.backlog = 1024
  1458. ## The TCP send timeout for the WebSocket/SSL connection.
  1459. ##
  1460. ## See: listener.tcp.$name.send_timeout
  1461. ##
  1462. ## Value: Duration
  1463. listener.wss.external.send_timeout = 15s
  1464. ## Close the WebSocket/SSL connection if send timeout.
  1465. ##
  1466. ## See: listener.tcp.$name.send_timeout_close
  1467. ##
  1468. ## Value: on | off
  1469. listener.wss.external.send_timeout_close = on
  1470. ## The TCP receive buffer(os kernel) for the WebSocket/SSL connections.
  1471. ##
  1472. ## See: listener.tcp.$name.recbuf
  1473. ##
  1474. ## Value: Bytes
  1475. ## listener.wss.external.recbuf = 4KB
  1476. ## The TCP send buffer(os kernel) for the WebSocket/SSL connections.
  1477. ##
  1478. ## See: listener.tcp.$name.sndbuf
  1479. ##
  1480. ## Value: Bytes
  1481. ## listener.wss.external.sndbuf = 4KB
  1482. ## The size of the user-level software buffer used by the driver.
  1483. ##
  1484. ## See: listener.tcp.$name.buffer
  1485. ##
  1486. ## Value: Bytes
  1487. ## listener.wss.external.buffer = 4KB
  1488. ## The TCP_NODELAY flag for WebSocket/SSL connections.
  1489. ##
  1490. ## See: listener.tcp.$name.nodelay
  1491. ##
  1492. ## Value: true | false
  1493. ## listener.wss.external.nodelay = true
  1494. ## The compress flag for external WebSocket/SSL connections.
  1495. ##
  1496. ## If this Value is set true,the websocket message would be compressed
  1497. ##
  1498. ## Value: true | false
  1499. ## listener.wss.external.compress = true
  1500. ## The level of deflate options for external WebSocket/SSL connections.
  1501. ##
  1502. ## See: listener.wss.$name.deflate_opts.level
  1503. ##
  1504. ## Value: none | default | best_compression | best_speed
  1505. ## listener.wss.external.deflate_opts.level = default
  1506. ## The mem_level of deflate options for external WebSocket/SSL connections.
  1507. ##
  1508. ## See: listener.wss.$name.deflate_opts.mem_level
  1509. ##
  1510. ## Valid range is 1-9
  1511. ## listener.wss.external.deflate_opts.mem_level = 8
  1512. ## The strategy of deflate options for external WebSocket/SSL connections.
  1513. ##
  1514. ## See: listener.wss.$name.deflate_opts.strategy
  1515. ##
  1516. ## Value: default | filtered | huffman_only | rle
  1517. ## listener.wss.external.deflate_opts.strategy = default
  1518. ## The deflate option for external WebSocket/SSL connections.
  1519. ##
  1520. ## See: listener.wss.$name.deflate_opts.server_context_takeover
  1521. ##
  1522. ## Value: takeover | no_takeover
  1523. ## listener.wss.external.deflate_opts.server_context_takeover = takeover
  1524. ## The deflate option for external WebSocket/SSL connections.
  1525. ##
  1526. ## See: listener.wss.$name.deflate_opts.client_context_takeover
  1527. ##
  1528. ## Value: takeover | no_takeover
  1529. ## listener.wss.external.deflate_opts.client_context_takeover = takeover
  1530. ## The deflate options for external WebSocket/SSL connections.
  1531. ##
  1532. ## See: listener.wss.$name.deflate_opts.server_max_window_bits
  1533. ##
  1534. ## Valid range is 8-15
  1535. ## listener.wss.external.deflate_opts.server_max_window_bits = 15
  1536. ## The deflate options for external WebSocket/SSL connections.
  1537. ##
  1538. ## See: listener.wss.$name.deflate_opts.client_max_window_bits
  1539. ##
  1540. ## Valid range is 8-15
  1541. ## listener.wss.external.deflate_opts.client_max_window_bits = 15
  1542. ## The idle timeout for external WebSocket/SSL connections.
  1543. ##
  1544. ## See: listener.wss.$name.idle_timeout
  1545. ##
  1546. ## Value: Duration
  1547. ## listener.wss.external.idle_timeout = 60s
  1548. ## The max frame size for external WebSocket/SSL connections.
  1549. ##
  1550. ## Value: Number
  1551. ## listener.wss.external.max_frame_size = 0
  1552. ##--------------------------------------------------------------------
  1553. ## Modules
  1554. ##--------------------------------------------------------------------
  1555. ##--------------------------------------------------------------------
  1556. ## Presence Module
  1557. ## Enable Presence Module.
  1558. ##
  1559. ## Value: on | off
  1560. module.presence = on
  1561. ## Sets the QoS for presence MQTT message.
  1562. ##
  1563. ## Value: 0 | 1 | 2
  1564. module.presence.qos = 1
  1565. ##--------------------------------------------------------------------
  1566. ## Subscription Module
  1567. ## Enable Subscription Module.
  1568. ##
  1569. ## Value: on | off
  1570. module.subscription = off
  1571. ## Subscribe the Topics automatically when client connected.
  1572. ## module.subscription.1.topic = $client/%c
  1573. ## Qos of the subscription: 0 | 1 | 2
  1574. ## module.subscription.1.qos = 1
  1575. ## module.subscription.2.topic = $user/%u
  1576. ## module.subscription.2.qos = 1
  1577. ##--------------------------------------------------------------------
  1578. ## Rewrite Module
  1579. ## Enable Rewrite Module.
  1580. ##
  1581. ## Value: on | off
  1582. module.rewrite = off
  1583. ## {rewrite, Topic, Re, Dest}
  1584. ## module.rewrite.rule.1 = x/# ^x/y/(.+)$ z/y/$1
  1585. ## module.rewrite.rule.2 = y/+/z/# ^y/(.+)/z/(.+)$ y/z/$2
  1586. ##-------------------------------------------------------------------
  1587. ## Plugins
  1588. ##-------------------------------------------------------------------
  1589. ## The etc dir for plugins' config.
  1590. ##
  1591. ## Value: Folder
  1592. plugins.etc_dir = {{ platform_etc_dir }}/plugins/
  1593. ## The file to store loaded plugin names.
  1594. ##
  1595. ## Value: File
  1596. plugins.loaded_file = {{ platform_data_dir }}/loaded_plugins
  1597. ## File to store loaded plugin names.
  1598. plugins.expand_plugins_dir = {{ platform_plugins_dir }}/
  1599. ##--------------------------------------------------------------------
  1600. ## Broker
  1601. ##--------------------------------------------------------------------
  1602. ## System interval of publishing $SYS messages.
  1603. ##
  1604. ## Value: Duration
  1605. ## Default: 1m, 1 minute
  1606. broker.sys_interval = 1m
  1607. ## System heartbeat interval of publishing following heart beat message:
  1608. ## - "$SYS/brokers/<node>/uptime"
  1609. ## - "$SYS/brokers/<node>/datetime"
  1610. ##
  1611. ## Value: Duration
  1612. ## Default: 30s
  1613. broker.sys_heartbeat = 30s
  1614. ## Enable global session registry.
  1615. ##
  1616. ## Value: on | off
  1617. broker.enable_session_registry = on
  1618. ## Session locking strategy in a cluster.
  1619. ##
  1620. ## Value: Enum
  1621. ## - local
  1622. ## - one
  1623. ## - quorum
  1624. ## - all
  1625. broker.session_locking_strategy = quorum
  1626. ## Dispatch strategy for shared subscription
  1627. ##
  1628. ## Value: Enum
  1629. ## - random
  1630. ## - round_robin
  1631. ## - sticky
  1632. ## - hash
  1633. broker.shared_subscription_strategy = random
  1634. ## Enable/disable shared dispatch acknowledgement for QoS1 and QoS2 messages
  1635. ## This should allow messages to be dispatched to a different subscriber in
  1636. ## the group in case the picked (based on shared_subscription_strategy) one # is offline
  1637. ##
  1638. ## Value: Enum
  1639. ## - true
  1640. ## - false
  1641. broker.shared_dispatch_ack_enabled = false
  1642. ## Enable batch clean for deleted routes.
  1643. ##
  1644. ## Value: Flag
  1645. broker.route_batch_clean = off
  1646. ##--------------------------------------------------------------------
  1647. ## System Monitor
  1648. ##--------------------------------------------------------------------
  1649. ## Enable Long GC monitoring. Disable if the value is 0.
  1650. ## Notice: don't enable the monitor in production for:
  1651. ## https://github.com/erlang/otp/blob/feb45017da36be78d4c5784d758ede619fa7bfd3/erts/emulator/beam/erl_gc.c#L421
  1652. ##
  1653. ## Value: Duration
  1654. ## - h: hour
  1655. ## - m: minute
  1656. ## - s: second
  1657. ## - ms: milliseconds
  1658. ##
  1659. ## Examples:
  1660. ## - 2h: 2 hours
  1661. ## - 30m: 30 minutes
  1662. ## - 0.1s: 0.1 seconds
  1663. ## - 100ms : 100 milliseconds
  1664. ##
  1665. ## Default: 0ms
  1666. sysmon.long_gc = 0
  1667. ## Enable Long Schedule(ms) monitoring.
  1668. ##
  1669. ## See: http://erlang.org/doc/man/erlang.html#system_monitor-2
  1670. ##
  1671. ## Value: Duration
  1672. ## - h: hour
  1673. ## - m: minute
  1674. ## - s: second
  1675. ## - ms: milliseconds
  1676. ##
  1677. ## Examples:
  1678. ## - 2h: 2 hours
  1679. ## - 30m: 30 minutes
  1680. ## - 0.1s: 0.1 seconds
  1681. ## - 100ms: 100 milliseconds
  1682. ##
  1683. ## Default: 0ms
  1684. sysmon.long_schedule = 240ms
  1685. ## Enable Large Heap monitoring.
  1686. ##
  1687. ## See: http://erlang.org/doc/man/erlang.html#system_monitor-2
  1688. ##
  1689. ## Value: bytes
  1690. ##
  1691. ## Default: 8M words. 32MB on 32-bit VM, 64MB on 64-bit VM.
  1692. sysmon.large_heap = 8MB
  1693. ## Enable Busy Port monitoring.
  1694. ##
  1695. ## See: http://erlang.org/doc/man/erlang.html#system_monitor-2
  1696. ##
  1697. ## Value: true | false
  1698. sysmon.busy_port = false
  1699. ## Enable Busy Dist Port monitoring.
  1700. ##
  1701. ## See: http://erlang.org/doc/man/erlang.html#system_monitor-2
  1702. ##
  1703. ## Value: true | false
  1704. sysmon.busy_dist_port = true
  1705. ## The time interval for the periodic cpu check
  1706. ##
  1707. ## Value: Duration
  1708. ## -h: hour, e.g. '2h' for 2 hours
  1709. ## -m: minute, e.g. '5m' for 5 minutes
  1710. ## -s: second, e.g. '30s' for 30 seconds
  1711. ##
  1712. ## Default: 60s
  1713. os_mon.cpu_check_interval = 60s
  1714. ## The threshold, as percentage of system cpu, for how much system cpu can be used before the corresponding alarm is set.
  1715. ##
  1716. ## Default: 80%
  1717. os_mon.cpu_high_watermark = 80%
  1718. ## The threshold, as percentage of system cpu, for how much system cpu can be used before the corresponding alarm is clear.
  1719. ##
  1720. ## Default: 60%
  1721. os_mon.cpu_low_watermark = 60%
  1722. ## The time interval for the periodic memory check
  1723. ##
  1724. ## Value: Duration
  1725. ## -h: hour, e.g. '2h' for 2 hours
  1726. ## -m: minute, e.g. '5m' for 5 minutes
  1727. ## -s: second, e.g. '30s' for 30 seconds
  1728. ##
  1729. ## Default: 60s
  1730. os_mon.mem_check_interval = 60s
  1731. ## The threshold, as percentage of system memory, for how much system memory can be allocated before the corresponding alarm is set.
  1732. ##
  1733. ## Default: 70%
  1734. os_mon.sysmem_high_watermark = 70%
  1735. ## The threshold, as percentage of system memory, for how much system memory can be allocated by one Erlang process before the corresponding alarm is set.
  1736. ##
  1737. ## Default: 5%
  1738. os_mon.procmem_high_watermark = 5%
  1739. ## The time interval for the periodic process limit check
  1740. ##
  1741. ## Value: Duration
  1742. ##
  1743. ## Default: 30s
  1744. vm_mon.check_interval = 30s
  1745. ## The threshold, as percentage of processes, for how many processes can simultaneously exist at the local node before the corresponding alarm is set.
  1746. ##
  1747. ## Default: 80%
  1748. vm_mon.process_high_watermark = 80%
  1749. ## The threshold, as percentage of processes, for how many processes can simultaneously exist at the local node before the corresponding alarm is clear.
  1750. ##
  1751. ## Default: 60%
  1752. vm_mon.process_low_watermark = 60%
  1753. {{ additional_configs }}