| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498 |
- node {
- name = "emqx@127.0.0.1"
- cookie = "emqxsecretcookie"
- data_dir = "data"
- }
- log {
- file_handlers.default {
- level = warning
- file = "log/emqx.log"
- }
- }
- cluster {
- name = emqxcl
- discovery_strategy = manual
- }
- dashboard {
- listeners.http {
- bind = 18083
- }
- default_username = "admin"
- default_password = "public"
- }
- authentication = [
- {
- backend = "built_in_database"
- mechanism = "password_based"
- password_hash_algorithm {name = "sha256", salt_position = "suffix"}
- user_id_type = "username"
- },
- {
- algorithm = "hmac-based"
- from = "password"
- mechanism = "jwt"
- secret = "emqxsecret"
- "secret_base64_encoded" = false
- use_jwks = false
- },
- {
- backend = "http"
- body {password = "${password}", username = "${username}"}
- connect_timeout = "15s"
- enable_pipelining = 100
- headers {"content-type" = "application/json"}
- mechanism = "password_based"
- method = "post"
- pool_size = 8
- request_timeout = "5s"
- ssl {enable = false, verify = "verify_peer"}
- url = "http://127.0.0.1:8080"
- }
- ]
- authorization {
- cache {enable = true}
- deny_action = "ignore"
- no_match = "allow"
- sources = [
- {
- cmd = "HGETALL mqtt_acl:${username}"
- database = 0
- pool_size = 8
- redis_type = "single"
- server = "127.0.0.1:6379"
- ssl {enable = false, verify = "verify_peer"}
- type = "redis"
- },
- {
- database = "mqtt_acl"
- pool_size = 8
- query = "SELECT action, permission, topic FROM mqtt_acl where username = ${username}"
- server = "127.0.0.1:5432"
- ssl {enable = false, verify = "verify_peer"}
- type = "postgresql"
- username = "root"
- },
- {
- collection = "users"
- database = "mqtt"
- filter {username = "${username}"}
- mongo_type = "single"
- pool_size = 8
- server = "127.0.0.1:27017"
- ssl {enable = false, verify = "verify_peer"}
- topology {connect_timeout_ms = "20s"}
- type = "mongodb"
- },
- {
- database = "mqtt_acl"
- pool_size = 8
- query = "SELECT action, permission, topic FROM mqtt_acl where username = ${username}"
- server = "127.0.0.1:3306"
- ssl {enable = false, verify = "verify_peer"}
- type = "mysql"
- username = "root"
- },
- {
- body {username = "${username}"}
- connect_timeout = "15s"
- enable_pipelining = 100
- headers {"content-type" = "application/json"}
- method = "post"
- pool_size = 8
- request_timeout = "30s"
- ssl {enable = false, verify = "verify_peer"}
- type = "http"
- url = "http://127.0.0.1:8080"
- },
- {
- enable = true
- path = "etc/acl.conf"
- type = "file"
- }
- ]
- }
- bridges {
- webhook {
- test {
- connect_timeout = "15s"
- enable_pipelining = 100
- headers {"content-type" = "application/json"}
- method = "post"
- pool_size = 8
- pool_type = "random"
- request_timeout = "15s"
- resource_opts {
- async_inflight_window = 100
- auto_restart_interval = "60s"
- health_check_interval = "15s"
- max_queue_bytes = "1GB"
- query_mode = "async"
- request_timeout = "15s"
- worker_pool_size = 4
- }
- ssl {enable = false, verify = "verify_peer"}
- url = "http://127.0.0.1:8080/test"
- }
- }
- }
- conn_congestion {enable_alarm = true, min_alarm_sustain_duration = "1m"}
- delayed {enable = true, max_delayed_messages = 10}
- exhook {
- servers = [
- {
- auto_reconnect = "60s"
- enable = false
- failed_action = "deny"
- name = "testx"
- pool_size = 16
- request_timeout = "5s"
- ssl {enable = false, verify = "verify_peer"}
- url = "http://127.0.0.1:8080/exhook"
- }
- ]
- }
- flapping_detect {
- ban_time = "5m"
- enable = false
- max_count = 15
- window_time = "1m"
- }
- force_gc {
- bytes = "16MB"
- count = 16000
- enable = true
- }
- force_shutdown {
- enable = true
- max_heap_size = "32MB"
- max_message_queue_len = 1000
- }
- gateway {
- coap {
- connection_required = false
- enable_stats = true
- listeners {
- udp {
- default {
- bind = "5683"
- max_conn_rate = 1000
- max_connections = 1024000
- }
- }
- }
- mountpoint = ""
- notify_type = "qos"
- publish_qos = "coap"
- subscribe_qos = "coap"
- }
- exproto {
- enable_stats = true
- handler {
- address = "http://127.0.0.1:9001"
- ssl_options {enable = false}
- }
- idle_timeout = "30s"
- listeners {
- tcp {
- default {
- acceptors = 16
- bind = "7993"
- max_conn_rate = 1000
- max_connections = 1024000
- }
- }
- }
- mountpoint = ""
- server {
- bind = "127.0.0.1:9100"
- ssl_options {verify = "verify_none"}
- }
- }
- "lwm2m" {
- auto_observe = true
- enable_stats = true
- idle_timeout = "30s"
- lifetime_max = "86400s"
- lifetime_min = "1s"
- listeners {
- udp {
- default {
- bind = "5783"
- max_conn_rate = 1000
- max_connections = 1024000
- }
- }
- }
- mountpoint = ""
- qmode_time_window = "22s"
- translators {
- command {qos = 0, topic = "dn/#"}
- notify {qos = 0, topic = "up/notify"}
- register {qos = 0, topic = "up/resp"}
- response {qos = 0, topic = "up/resp"}
- update {qos = 0, topic = "up/update"}
- }
- update_msg_publish_condition = "contains_object_list"
- xml_dir = "etc/lwm2m_xml/"
- }
- mqttsn {
- broadcast = true
- "enable_qos3" = true
- enable_stats = true
- gateway_id = 1
- idle_timeout = "30s"
- listeners {
- udp {
- default {
- bind = "1884"
- max_conn_rate = 1000
- max_connections = 1024000
- }
- }
- }
- mountpoint = ""
- predefined = []
- }
- stomp {
- enable_stats = true
- frame {
- max_body_length = 8192
- max_headers = 10
- max_headers_length = 1024
- }
- idle_timeout = "30s"
- listeners {
- tcp {
- default {
- bind = "61613"
- max_conn_rate = 1000
- max_connections = 1024000
- }
- }
- }
- mountpoint = ""
- }
- }
- listeners {
- ssl {
- default {
- bind = "0.0.0.0:8883"
- max_connections = 512000
- ssl_options {
- cacertfile = "etc/certs/cacert.pem"
- certfile = "etc/certs/cert.pem"
- keyfile = "etc/certs/key.pem"
- }
- }
- }
- tcp {
- default {
- acceptors = 32
- bind = "0.0.0.0:1883"
- enable_authn = true
- enabled = true
- limiter {
- bytes_in {
- capacity = "infinity"
- initial = "0"
- rate = "infinity"
- }
- client {
- bytes_in {
- capacity = "infinity"
- divisible = false
- failure_strategy = "force"
- initial = "0"
- low_watermark = "0"
- max_retry_time = "10s"
- rate = "infinity"
- }
- connection {
- capacity = "infinity"
- divisible = false
- failure_strategy = "force"
- initial = "0"
- low_watermark = "0"
- max_retry_time = "10s"
- rate = "infinity"
- }
- message_in {
- capacity = "infinity"
- divisible = false
- failure_strategy = "force"
- initial = "0"
- low_watermark = "0"
- max_retry_time = "10s"
- rate = "infinity"
- }
- message_routing {
- capacity = "infinity"
- divisible = false
- failure_strategy = "force"
- initial = "0"
- low_watermark = "0"
- max_retry_time = "10s"
- rate = "infinity"
- }
- }
- connection {
- capacity = "1000"
- initial = "0"
- rate = "1000/s"
- }
- message_in {
- capacity = "infinity"
- initial = "0"
- rate = "infinity"
- }
- message_routing {
- capacity = "infinity"
- initial = "0"
- rate = "infinity"
- }
- }
- max_connections = 1024000
- proxy_protocol = false
- proxy_protocol_timeout = "3s"
- tcp_options {
- active_n = 100
- backlog = 1024
- buffer = "4KB"
- high_watermark = "1MB"
- nodelay = true
- reuseaddr = true
- send_timeout = "15s"
- send_timeout_close = true
- }
- zone = "default"
- }
- }
- ws {
- default {
- bind = "0.0.0.0:8083"
- max_connections = 1024000
- websocket {mqtt_path = "/mqtt"}
- }
- }
- wss {
- default {
- bind = "0.0.0.0:8084"
- max_connections = 512000
- ssl_options {
- cacertfile = "etc/certs/cacert.pem"
- certfile = "etc/certs/cert.pem"
- keyfile = "etc/certs/key.pem"
- }
- websocket {mqtt_path = "/mqtt"}
- }
- }
- }
- mqtt {
- await_rel_timeout = "300s"
- exclusive_subscription = false
- idle_timeout = "15s"
- ignore_loop_deliver = false
- keepalive_backoff = 0.75
- max_awaiting_rel = 100
- max_clientid_len = 65535
- max_inflight = 320
- max_mqueue_len = 1000
- max_packet_size = "10MB"
- max_qos_allowed = 2
- max_subscriptions = "infinity"
- max_topic_alias = 65535
- max_topic_levels = 128
- mqueue_default_priority = "lowest"
- mqueue_priorities = "disabled"
- "mqueue_store_qos0" = true
- peer_cert_as_clientid = "disabled"
- peer_cert_as_username = "disabled"
- response_information = ""
- retain_available = true
- retry_interval = "30s"
- server_keepalive = "disabled"
- session_expiry_interval = "2h"
- shared_subscription = true
- strict_mode = false
- upgrade_qos = false
- use_username_as_clientid = false
- wildcard_subscription = true
- }
- overload_protection {
- backoff_delay = 1
- backoff_gc = false
- backoff_hibernation = true
- backoff_new_conn = true
- enable = false
- }
- retainer {
- backend {
- index_specs = [
- [1, 2, 3],
- [1, 3],
- [2, 3],
- [3]
- ]
- max_retained_messages = 0
- storage_type = "ram"
- type = "built_in_database"
- }
- enable = true
- flow_control {
- batch_deliver_limiter {
- capacity = "infinity"
- client {
- capacity = "infinity"
- divisible = false
- failure_strategy = "force"
- initial = "0"
- low_watermark = "0"
- max_retry_time = "10s"
- rate = "infinity"
- }
- initial = "0"
- rate = "infinity"
- }
- batch_deliver_number = 0
- batch_read_number = 0
- }
- max_payload_size = "10MB"
- msg_clear_interval = "0s"
- msg_expiry_interval = "0s"
- stop_publish_clear_msg = false
- }
- rule_engine {
- ignore_sys_message = true
- jq_function_default_timeout = "10s"
- jq_implementation_module = "jq_nif"
- rules {
- rule_plna {
- actions = ["webhook:test"]
- description = ""
- metadata {created_at = 1684226199152}
- sql = "SELECT\n *\nFROM\n \"t/#\""
- }
- }
- }
- slow_subs {
- enable = true
- expire_interval = "300s"
- stats_type = "whole"
- threshold = "500ms"
- top_k_num = 10
- }
- stats {enable = true}
- sys_topics {
- sys_event_messages {
- client_connected = true
- client_disconnected = true
- client_subscribed = true
- client_unsubscribed = true
- }
- sys_heartbeat_interval = "30s"
- sys_msg_interval = "1m"
- }
|