v5.0.23.conf 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. node {
  2. name = "emqx@127.0.0.1"
  3. cookie = "emqxsecretcookie"
  4. data_dir = "data"
  5. }
  6. log {
  7. file_handlers.default {
  8. level = warning
  9. file = "log/emqx.log"
  10. }
  11. }
  12. cluster {
  13. name = emqxcl
  14. discovery_strategy = manual
  15. }
  16. dashboard {
  17. listeners.http {
  18. bind = 18083
  19. }
  20. default_username = "admin"
  21. default_password = "public"
  22. }
  23. authentication = [
  24. {
  25. algorithm = "hmac-based"
  26. from = "password"
  27. mechanism = "jwt"
  28. secret = "emqxsecret"
  29. "secret_base64_encoded" = false
  30. use_jwks = false
  31. verify_claims {}
  32. }
  33. ]
  34. authorization {
  35. cache {enable = true}
  36. deny_action = "ignore"
  37. no_match = "allow"
  38. sources = [
  39. {type = "built_in_database"},
  40. {
  41. enable = true
  42. path = "etc/acl.conf"
  43. type = "file"
  44. }
  45. ]
  46. }
  47. bridges {
  48. mqtt {
  49. "to-public-broker" {
  50. bridge_mode = false
  51. clean_start = true
  52. egress {
  53. local {topic = "t/#"}
  54. remote {
  55. payload = "${payload}"
  56. qos = 1
  57. retain = false
  58. topic = "b/t"
  59. }
  60. }
  61. enable = true
  62. keepalive = "300s"
  63. mode = "cluster_shareload"
  64. proto_ver = "v4"
  65. resource_opts {
  66. auto_restart_interval = "60s"
  67. health_check_interval = "15s"
  68. inflight_window = 100
  69. max_buffer_bytes = "1GB"
  70. query_mode = "async"
  71. request_timeout = "15s"
  72. worker_pool_size = 4
  73. }
  74. retry_interval = "15s"
  75. server = "broker.emqx.io:1883"
  76. ssl {enable = false, verify = "verify_peer"}
  77. }
  78. }
  79. }
  80. exhook {
  81. servers = [
  82. {
  83. auto_reconnect = "60s"
  84. enable = false
  85. failed_action = "deny"
  86. name = "test"
  87. pool_size = 16
  88. request_timeout = "5s"
  89. ssl {enable = false, verify = "verify_peer"}
  90. url = "http://127.0.0.1:8080/exhook"
  91. }
  92. ]
  93. }
  94. gateway {
  95. mqttsn {
  96. broadcast = true
  97. "enable_qos3" = true
  98. enable_stats = true
  99. gateway_id = 1
  100. idle_timeout = "30s"
  101. listeners {
  102. udp {
  103. default {
  104. bind = "1884"
  105. max_conn_rate = 1000
  106. max_connections = 1024000
  107. }
  108. }
  109. }
  110. mountpoint = ""
  111. predefined = []
  112. }
  113. }
  114. listeners {
  115. ssl {
  116. default {
  117. bind = "0.0.0.0:8883"
  118. max_connections = 512000
  119. ssl_options {
  120. cacertfile = "etc/certs/cacert.pem"
  121. certfile = "etc/certs/cert.pem"
  122. keyfile = "etc/certs/key.pem"
  123. }
  124. }
  125. }
  126. tcp {
  127. default {
  128. acceptors = 32
  129. bind = "0.0.0.0:1883"
  130. enable_authn = true
  131. enabled = true
  132. limiter {
  133. bytes {rate = "infinity"}
  134. client {
  135. bytes {rate = "infinity"}
  136. messages {rate = "infinity"}
  137. }
  138. messages {rate = "infinity"}
  139. }
  140. max_connections = 1024000
  141. proxy_protocol = false
  142. proxy_protocol_timeout = "3s"
  143. tcp_options {
  144. active_n = 100
  145. backlog = 1024
  146. buffer = "4KB"
  147. high_watermark = "1MB"
  148. nodelay = true
  149. reuseaddr = true
  150. send_timeout = "15s"
  151. send_timeout_close = true
  152. }
  153. zone = "default"
  154. }
  155. }
  156. ws {
  157. default {
  158. bind = "0.0.0.0:8083"
  159. max_connections = 1024000
  160. websocket {mqtt_path = "/mqtt"}
  161. }
  162. }
  163. wss {
  164. default {
  165. bind = "0.0.0.0:8084"
  166. max_connections = 512000
  167. ssl_options {
  168. cacertfile = "etc/certs/cacert.pem"
  169. certfile = "etc/certs/cert.pem"
  170. keyfile = "etc/certs/key.pem"
  171. }
  172. websocket {mqtt_path = "/mqtt"}
  173. }
  174. }
  175. }
  176. mqtt {
  177. await_rel_timeout = "300s"
  178. exclusive_subscription = true
  179. idle_timeout = "15s"
  180. ignore_loop_deliver = true
  181. keepalive_backoff = 1
  182. max_awaiting_rel = 100
  183. max_clientid_len = 65535
  184. max_inflight = 32
  185. max_mqueue_len = 1000
  186. max_packet_size = "1MB"
  187. max_qos_allowed = 2
  188. max_subscriptions = 100
  189. max_topic_alias = 65535
  190. max_topic_levels = 128
  191. mqueue_default_priority = "lowest"
  192. mqueue_priorities = "disabled"
  193. "mqueue_store_qos0" = true
  194. peer_cert_as_clientid = "cn"
  195. peer_cert_as_username = "cn"
  196. response_information = ""
  197. retain_available = true
  198. retry_interval = "30s"
  199. server_keepalive = 200
  200. session_expiry_interval = "2h"
  201. shared_subscription = true
  202. strict_mode = true
  203. upgrade_qos = true
  204. use_username_as_clientid = true
  205. wildcard_subscription = true
  206. }
  207. retainer {
  208. backend {
  209. index_specs = [
  210. [1, 2, 3],
  211. [1, 3],
  212. [2, 3],
  213. [3]
  214. ]
  215. max_retained_messages = 1000
  216. storage_type = "ram"
  217. type = "built_in_database"
  218. }
  219. enable = true
  220. max_payload_size = "1MB"
  221. msg_clear_interval = "20000ms"
  222. msg_expiry_interval = "10000ms"
  223. stop_publish_clear_msg = false
  224. }
  225. rule_engine {
  226. ignore_sys_message = true
  227. jq_function_default_timeout = "10s"
  228. rules {
  229. rule_tcbl {
  230. actions = ["mqtt:to-public-broker"]
  231. description = ""
  232. metadata {created_at = 1684223521242}
  233. sql = "SELECT\n *\nFROM\n \"t/#\""
  234. }
  235. }
  236. }
  237. sys_topics {
  238. sys_event_messages {
  239. client_connected = true
  240. client_disconnected = true
  241. client_subscribed = true
  242. client_unsubscribed = true
  243. }
  244. sys_heartbeat_interval = "30s"
  245. sys_msg_interval = "1m"
  246. }
  247. sysmon {
  248. os {
  249. cpu_check_interval = "60s"
  250. cpu_high_watermark = "80%"
  251. cpu_low_watermark = "60%"
  252. mem_check_interval = "60s"
  253. procmem_high_watermark = "5%"
  254. sysmem_high_watermark = "70%"
  255. }
  256. top {
  257. db_hostname = ""
  258. db_name = "postgres"
  259. db_password = "******"
  260. db_port = 5432
  261. db_username = "system_monitor"
  262. max_procs = 1000000
  263. num_items = 10
  264. sample_interval = "2s"
  265. }
  266. vm {
  267. busy_dist_port = true
  268. busy_port = true
  269. large_heap = "32MB"
  270. long_gc = "100ms"
  271. long_schedule = "240ms"
  272. process_check_interval = "30s"
  273. process_high_watermark = "80%"
  274. process_low_watermark = "60%"
  275. }
  276. }