e5.0.1.conf 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  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. backend = "built_in_database"
  26. mechanism = "password_based"
  27. password_hash_algorithm {name = "sha256", salt_position = "suffix"}
  28. user_id_type = "username"
  29. }
  30. ]
  31. authorization {
  32. cache {enable = true}
  33. deny_action = "ignore"
  34. no_match = "allow"
  35. sources = [
  36. {
  37. body {username = "${username}"}
  38. connect_timeout = "5s"
  39. enable_pipelining = 100
  40. headers {"content-type" = "application/json"}
  41. method = "post"
  42. pool_size = 8
  43. request_timeout = "5s"
  44. ssl {enable = false, verify = "verify_peer"}
  45. type = "http"
  46. url = "http://127.0.0.1:8080"
  47. },
  48. {
  49. enable = true
  50. path = "etc/acl.conf"
  51. type = "file"
  52. }
  53. ]
  54. }
  55. bridges {
  56. webhook {
  57. test {
  58. connect_timeout = "5s"
  59. enable_pipelining = 100
  60. headers {"content-type" = "application/json"}
  61. method = "post"
  62. pool_size = 4
  63. pool_type = "random"
  64. request_timeout = "15s"
  65. resource_opts {
  66. async_inflight_window = 100
  67. auto_restart_interval = "60s"
  68. health_check_interval = "15s"
  69. max_queue_bytes = "1GB"
  70. query_mode = "async"
  71. request_timeout = "15s"
  72. worker_pool_size = 4
  73. }
  74. ssl {enable = false, verify = "verify_peer"}
  75. url = "http://127.0.0.1:8080"
  76. }
  77. }
  78. }
  79. gateway {
  80. mqttsn {
  81. broadcast = true
  82. "enable_qos3" = true
  83. enable_stats = true
  84. gateway_id = 1
  85. idle_timeout = "30s"
  86. listeners {
  87. udp {
  88. default {
  89. bind = "1884"
  90. max_conn_rate = 1000
  91. max_connections = 1024000
  92. }
  93. }
  94. }
  95. mountpoint = ""
  96. predefined = []
  97. }
  98. }
  99. limiter {
  100. bytes_in {burst = "0", rate = "10MB"}
  101. client {
  102. bytes_in {
  103. capacity = "infinity"
  104. divisible = false
  105. failure_strategy = "force"
  106. initial = "0"
  107. low_watermark = "0"
  108. max_retry_time = "10s"
  109. rate = "100KB"
  110. }
  111. connection {
  112. capacity = "infinity"
  113. divisible = false
  114. failure_strategy = "force"
  115. initial = "0"
  116. low_watermark = "0"
  117. max_retry_time = "10s"
  118. rate = "infinity"
  119. }
  120. internal {
  121. capacity = "infinity"
  122. divisible = false
  123. failure_strategy = "force"
  124. initial = "0"
  125. low_watermark = "0"
  126. max_retry_time = "10s"
  127. rate = "infinity"
  128. }
  129. message_in {
  130. capacity = "infinity"
  131. divisible = false
  132. failure_strategy = "force"
  133. initial = "0"
  134. low_watermark = "0"
  135. max_retry_time = "10s"
  136. rate = "infinity"
  137. }
  138. message_routing {
  139. capacity = "infinity"
  140. divisible = false
  141. failure_strategy = "force"
  142. initial = "0"
  143. low_watermark = "0"
  144. max_retry_time = "10s"
  145. rate = "infinity"
  146. }
  147. }
  148. connection {burst = "0", rate = "1000"}
  149. internal {burst = "0", rate = "infinity"}
  150. message_in {burst = "0", rate = "1000"}
  151. message_routing {burst = "0", rate = "infinity"}
  152. }
  153. listeners {
  154. ssl {
  155. default {
  156. bind = "0.0.0.0:8883"
  157. max_connections = 512000
  158. ssl_options {
  159. cacertfile = "etc/certs/cacert.pem"
  160. certfile = "etc/certs/cert.pem"
  161. keyfile = "etc/certs/key.pem"
  162. }
  163. }
  164. }
  165. tcp {
  166. default {
  167. acceptors = 16
  168. bind = "0.0.0.0:1883"
  169. enable_authn = true
  170. enabled = true
  171. limiter {
  172. bytes_in {
  173. capacity = "infinity"
  174. initial = "0"
  175. rate = "infinity"
  176. }
  177. client {
  178. bytes_in {
  179. capacity = "infinity"
  180. divisible = false
  181. failure_strategy = "force"
  182. initial = "0"
  183. low_watermark = "0"
  184. max_retry_time = "10s"
  185. rate = "infinity"
  186. }
  187. connection {
  188. capacity = "infinity"
  189. divisible = false
  190. failure_strategy = "force"
  191. initial = "0"
  192. low_watermark = "0"
  193. max_retry_time = "10s"
  194. rate = "infinity"
  195. }
  196. message_in {
  197. capacity = "infinity"
  198. divisible = false
  199. failure_strategy = "force"
  200. initial = "0"
  201. low_watermark = "0"
  202. max_retry_time = "10s"
  203. rate = "infinity"
  204. }
  205. message_routing {
  206. capacity = "infinity"
  207. divisible = false
  208. failure_strategy = "force"
  209. initial = "0"
  210. low_watermark = "0"
  211. max_retry_time = "10s"
  212. rate = "infinity"
  213. }
  214. }
  215. connection {
  216. capacity = 1000
  217. initial = "0"
  218. rate = "1000/s"
  219. }
  220. message_in {
  221. capacity = "infinity"
  222. initial = "0"
  223. rate = "infinity"
  224. }
  225. message_routing {
  226. capacity = "infinity"
  227. initial = "0"
  228. rate = "infinity"
  229. }
  230. }
  231. max_connections = 2000
  232. proxy_protocol = false
  233. proxy_protocol_timeout = "3s"
  234. tcp_options {
  235. active_n = 100
  236. backlog = 1024
  237. buffer = "4KB"
  238. high_watermark = "1MB"
  239. nodelay = true
  240. reuseaddr = true
  241. send_timeout = "15s"
  242. send_timeout_close = true
  243. }
  244. zone = "default"
  245. }
  246. }
  247. ws {
  248. default {
  249. bind = "0.0.0.0:8083"
  250. max_connections = 1024000
  251. websocket {mqtt_path = "/mqtt"}
  252. }
  253. }
  254. wss {
  255. default {
  256. bind = "0.0.0.0:8084"
  257. max_connections = 512000
  258. ssl_options {
  259. cacertfile = "etc/certs/cacert.pem"
  260. certfile = "etc/certs/cert.pem"
  261. keyfile = "etc/certs/key.pem"
  262. }
  263. websocket {mqtt_path = "/mqtt"}
  264. }
  265. }
  266. }
  267. log {
  268. console_handler {
  269. burst_limit {
  270. enable = true
  271. max_count = 10000
  272. window_time = "1s"
  273. }
  274. chars_limit = "unlimited"
  275. drop_mode_qlen = 3000
  276. enable = true
  277. flush_qlen = 8000
  278. formatter = "text"
  279. level = "info"
  280. max_depth = 100
  281. overload_kill {
  282. enable = true
  283. mem_size = "30MB"
  284. qlen = 20000
  285. restart_after = "5s"
  286. }
  287. single_line = true
  288. supervisor_reports = "error"
  289. sync_mode_qlen = 100
  290. time_offset = "system"
  291. }
  292. file_handlers {
  293. default {
  294. burst_limit {
  295. enable = true
  296. max_count = 10000
  297. window_time = "1s"
  298. }
  299. chars_limit = "unlimited"
  300. drop_mode_qlen = 3000
  301. enable = false
  302. file = "log/emqx.log"
  303. flush_qlen = 8000
  304. formatter = "text"
  305. level = "warning"
  306. max_depth = 100
  307. max_size = "50MB"
  308. overload_kill {
  309. enable = true
  310. mem_size = "30MB"
  311. qlen = 20000
  312. restart_after = "5s"
  313. }
  314. rotation {count = 10, enable = true}
  315. single_line = true
  316. supervisor_reports = "error"
  317. sync_mode_qlen = 100
  318. time_offset = "system"
  319. }
  320. }
  321. }
  322. retainer {
  323. backend {
  324. index_specs = [
  325. [1, 2, 3],
  326. [1, 3],
  327. [2, 3],
  328. [3]
  329. ]
  330. max_retained_messages = 0
  331. storage_type = "ram"
  332. type = "built_in_database"
  333. }
  334. enable = true
  335. flow_control {
  336. batch_deliver_limiter {
  337. capacity = "infinity"
  338. client {
  339. capacity = "infinity"
  340. divisible = false
  341. failure_strategy = "force"
  342. initial = "0"
  343. low_watermark = "0"
  344. max_retry_time = "10s"
  345. rate = "infinity"
  346. }
  347. initial = "0"
  348. rate = "infinity"
  349. }
  350. batch_deliver_number = 0
  351. batch_read_number = 0
  352. }
  353. max_payload_size = "5MB"
  354. msg_clear_interval = "0s"
  355. msg_expiry_interval = "0s"
  356. stop_publish_clear_msg = false
  357. }
  358. rule_engine {
  359. ignore_sys_message = true
  360. jq_function_default_timeout = "10s"
  361. jq_implementation_module = jq_nif
  362. rules {
  363. "rule_bw1q" {
  364. actions = ["webhook:test"]
  365. description = ""
  366. metadata {created_at = 1683878250142}
  367. sql = "SELECT\n *\nFROM\n \"t/#\""
  368. }
  369. }
  370. }