Просмотр исходного кода

Merge pull request #10699 from HJianBo/conf-tests-2

chore(ci): add conf tests
JianBo He 2 лет назад
Родитель
Сommit
0dc3e10533

+ 53 - 0
.github/workflows/run_conf_tests.yaml

@@ -0,0 +1,53 @@
+name: Run Configuration tests
+
+concurrency:
+  group: test-${{ github.event_name }}-${{ github.ref }}
+  cancel-in-progress: true
+
+on:
+  push:
+    branches:
+      - master
+      - 'ci/**'
+    tags:
+      - v*
+      - e*
+  pull_request:
+
+env:
+  IS_CI: "yes"
+
+jobs:
+  run_conf_tests:
+    runs-on: ubuntu-22.04
+    strategy:
+      fail-fast: false
+      matrix:
+        profile:
+          - emqx
+          - emqx-enterprise
+    container: "ghcr.io/emqx/emqx-builder/5.0-34:1.13.4-25.1.2-3-ubuntu22.04"
+    steps:
+      - uses: AutoModality/action-clean@v1
+      - uses: actions/checkout@v3
+        with:
+          path: source
+      - name: build_package
+        working-directory: source
+        run: |
+          make ${{ matrix.profile }}
+      - name: run_tests
+        working-directory: source
+        env:
+          PROFILE: ${{ matrix.profile }}
+        run: |
+          ./scripts/conf-test/run.sh
+      - name: print_erlang_log
+        if: failure()
+        run: |
+          cat source/_build/${{ matrix.profile }}/rel/emqx/logs/erlang.log.*
+      - uses: actions/upload-artifact@v3
+        if: failure()
+        with:
+          name: logs-${{ matrix.profile }}
+          path: source/_build/${{ matrix.profile }}/rel/emqx/logs

+ 374 - 0
scripts/conf-test/old-confs/e5.0.0.conf

@@ -0,0 +1,374 @@
+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
+}
+
+
+listeners.tcp.default {
+  bind = "0.0.0.0:1883"
+  max_connections = 1024000
+}
+
+listeners.ssl.default {
+  bind = "0.0.0.0:8883"
+  max_connections = 512000
+  ssl_options {
+    keyfile = "etc/certs/key.pem"
+    certfile = "etc/certs/cert.pem"
+    cacertfile = "etc/certs/cacert.pem"
+  }
+}
+
+listeners.ws.default {
+  bind = "0.0.0.0:8083"
+  max_connections = 1024000
+  websocket.mqtt_path = "/mqtt"
+}
+
+listeners.wss.default {
+  bind = "0.0.0.0:8084"
+  max_connections = 512000
+  websocket.mqtt_path = "/mqtt"
+  ssl_options {
+    keyfile = "etc/certs/key.pem"
+    certfile = "etc/certs/cert.pem"
+    cacertfile = "etc/certs/cacert.pem"
+  }
+}
+
+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"
+  }
+]
+authorization {
+  cache {enable = true}
+  deny_action = "ignore"
+  no_match = "allow"
+  sources = [
+    {
+      body {username = "${username}"}
+      connect_timeout = "5s"
+      enable_pipelining = 100
+      headers {"content-type" = "application/json"}
+      method = "post"
+      pool_size = 8
+      request_timeout = "5s"
+      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 {
+    default {
+      connect_timeout = "5s"
+      enable_pipelining = 100
+      headers {"content-type" = "application/json"}
+      method = "post"
+      pool_size = 4
+      pool_type = "random"
+      request_timeout = "5s"
+      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/webhook"
+    }
+  }
+}
+conn_congestion {enable_alarm = true, min_alarm_sustain_duration = "1m"}
+exhook {
+  servers = [
+    {
+      auto_reconnect = "60s"
+      enable = false
+      failed_action = "deny"
+      name = "exhook"
+      pool_size = 16
+      request_timeout = "5s"
+      ssl {enable = false, verify = "verify_peer"}
+      url = "http://127.0.0.1:8000"
+    }
+  ]
+}
+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 {
+  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 = ""
+  }
+}
+limiter {
+  bytes_in {burst = "1000", rate = "infinity"}
+  client {
+    bytes_in {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "0"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "1000KB/s"
+    }
+    connection {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "0"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "1000"
+    }
+    internal {
+      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 = "1000"
+    }
+    message_routing {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "0"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "infinity"
+    }
+  }
+  connection {burst = 0, rate = "infinity"}
+  internal {burst = 0, rate = "infinity"}
+  message_in {burst = 0, rate = "infinity"}
+  message_routing {burst = 0, rate = "1000"}
+}
+log {
+  console_handler {
+    burst_limit {
+      enable = true
+      max_count = 10000
+      window_time = "1s"
+    }
+    chars_limit = "unlimited"
+    drop_mode_qlen = 3000
+    enable = true
+    flush_qlen = 8000
+    formatter = "text"
+    level = "info"
+    max_depth = 100
+    overload_kill {
+      enable = true
+      mem_size = "30MB"
+      qlen = 20000
+      restart_after = "5s"
+    }
+    single_line = true
+    supervisor_reports = "error"
+    sync_mode_qlen = 100
+    time_offset = "system"
+  }
+  file_handlers {
+    default {
+      burst_limit {
+        enable = true
+        max_count = 10000
+        window_time = "1s"
+      }
+      chars_limit = "unlimited"
+      drop_mode_qlen = 3000
+      enable = false
+      file = "log/emqx.log"
+      flush_qlen = 8000
+      formatter = "text"
+      level = "warning"
+      max_depth = 100
+      max_size = "50MB"
+      overload_kill {
+        enable = true
+        mem_size = "30MB"
+        qlen = 20000
+        restart_after = "5s"
+      }
+      rotation {count = 10, enable = true}
+      single_line = true
+      supervisor_reports = "error"
+      sync_mode_qlen = 100
+      time_offset = "system"
+    }
+  }
+}
+mqtt {
+  await_rel_timeout = "300s"
+  exclusive_subscription = false
+  idle_timeout = "15s"
+  ignore_loop_deliver = false
+  keepalive_backoff = 0.5
+  max_awaiting_rel = 100
+  max_clientid_len = 65535
+  max_inflight = 32
+  max_mqueue_len = 1000
+  max_packet_size = "1MB"
+  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_k9y8" {
+      actions = ["webhook:default"]
+      description = ""
+      metadata {created_at = 1683875156258}
+      sql = "SELECT\n  *\nFROM\n  \"t/#\""
+    }
+  }
+}
+stats {enable = true}
+sys_topics {
+  sys_event_messages {
+    client_connected = true
+    client_disconnected = false
+    client_subscribed = false
+    client_unsubscribed = false
+  }
+  sys_heartbeat_interval = "30s"
+  sys_msg_interval = "1m"
+}

+ 375 - 0
scripts/conf-test/old-confs/e5.0.1.conf

@@ -0,0 +1,375 @@
+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"
+  }
+]
+authorization {
+  cache {enable = true}
+  deny_action = "ignore"
+  no_match = "allow"
+  sources = [
+    {
+      body {username = "${username}"}
+      connect_timeout = "5s"
+      enable_pipelining = 100
+      headers {"content-type" = "application/json"}
+      method = "post"
+      pool_size = 8
+      request_timeout = "5s"
+      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 = "5s"
+      enable_pipelining = 100
+      headers {"content-type" = "application/json"}
+      method = "post"
+      pool_size = 4
+      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"
+    }
+  }
+}
+gateway {
+  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 = []
+  }
+}
+limiter {
+  bytes_in {burst = "0", rate = "10MB"}
+  client {
+    bytes_in {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "0"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "100KB"
+    }
+    connection {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "0"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "infinity"
+    }
+    internal {
+      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 {burst = "0", rate = "1000"}
+  internal {burst = "0", rate = "infinity"}
+  message_in {burst = "0", rate = "1000"}
+  message_routing {burst = "0", rate = "infinity"}
+}
+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 = 16
+      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 = 2000
+      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"}
+    }
+  }
+}
+log {
+  console_handler {
+    burst_limit {
+      enable = true
+      max_count = 10000
+      window_time = "1s"
+    }
+    chars_limit = "unlimited"
+    drop_mode_qlen = 3000
+    enable = true
+    flush_qlen = 8000
+    formatter = "text"
+    level = "info"
+    max_depth = 100
+    overload_kill {
+      enable = true
+      mem_size = "30MB"
+      qlen = 20000
+      restart_after = "5s"
+    }
+    single_line = true
+    supervisor_reports = "error"
+    sync_mode_qlen = 100
+    time_offset = "system"
+  }
+  file_handlers {
+    default {
+      burst_limit {
+        enable = true
+        max_count = 10000
+        window_time = "1s"
+      }
+      chars_limit = "unlimited"
+      drop_mode_qlen = 3000
+      enable = false
+      file = "log/emqx.log"
+      flush_qlen = 8000
+      formatter = "text"
+      level = "warning"
+      max_depth = 100
+      max_size = "50MB"
+      overload_kill {
+        enable = true
+        mem_size = "30MB"
+        qlen = 20000
+        restart_after = "5s"
+      }
+      rotation {count = 10, enable = true}
+      single_line = true
+      supervisor_reports = "error"
+      sync_mode_qlen = 100
+      time_offset = "system"
+    }
+  }
+}
+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 = "5MB"
+  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_bw1q" {
+      actions = ["webhook:test"]
+      description = ""
+      metadata {created_at = 1683878250142}
+      sql = "SELECT\n  *\nFROM\n  \"t/#\""
+    }
+  }
+}

+ 454 - 0
scripts/conf-test/old-confs/e5.0.2.conf

@@ -0,0 +1,454 @@
+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"
+  }
+]
+authorization {
+  cache {enable = true}
+  deny_action = "ignore"
+  no_match = "allow"
+  sources = [
+    {
+      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 {
+    tests {
+      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"
+    }
+  }
+}
+conn_congestion {enable_alarm = true, min_alarm_sustain_duration = "1m"}
+exhook {
+  servers = [
+    {
+      auto_reconnect = "60s"
+      enable = false
+      failed_action = "deny"
+      name = "test"
+      pool_size = 16
+      request_timeout = "5s"
+      ssl {enable = false, verify = "verify_peer"}
+      url = "http://127.0.0.1:8080"
+    }
+  ]
+}
+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"
+  }
+}
+limiter {
+  bytes_in {burst = "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"
+    }
+    internal {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "0"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "500"
+    }
+    message_in {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "200"
+      low_watermark = "60"
+      max_retry_time = "10s"
+      rate = "100"
+    }
+    message_routing {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "0"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "infinity"
+    }
+  }
+  connection {burst = "0", rate = "infinity"}
+  internal {burst = "0", rate = "1000"}
+  message_in {burst = "0", rate = "10000"}
+  message_routing {burst = "0", rate = "infinity"}
+}
+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 = 16
+      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
+      mountpoint = "topic_prefix1/x"
+      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"}
+    }
+  }
+}
+log {
+  console_handler {
+    burst_limit {
+      enable = true
+      max_count = 10000
+      window_time = "1s"
+    }
+    chars_limit = "unlimited"
+    drop_mode_qlen = 3000
+    enable = true
+    flush_qlen = 8000
+    formatter = "text"
+    level = "info"
+    max_depth = 100
+    overload_kill {
+      enable = true
+      mem_size = "30MB"
+      qlen = "10000"
+      restart_after = "5s"
+    }
+    single_line = true
+    supervisor_reports = "error"
+    sync_mode_qlen = 100
+    time_offset = "system"
+  }
+  file_handlers {
+    default {
+      burst_limit {
+        enable = true
+        max_count = 10000
+        window_time = "1s"
+      }
+      chars_limit = "unlimited"
+      drop_mode_qlen = 3000
+      enable = true
+      file = "log/emqx.log"
+      flush_qlen = 8000
+      formatter = "text"
+      level = "warning"
+      max_depth = 100
+      max_size = "1000MB"
+      overload_kill {
+        enable = true
+        mem_size = "30MB"
+        qlen = 20000
+        restart_after = "5s"
+      }
+      rotation {count = 10, enable = true}
+      single_line = true
+      supervisor_reports = "error"
+      sync_mode_qlen = 100
+      time_offset = "system"
+    }
+  }
+}
+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 = 8
+  max_mqueue_len = 1000
+  max_packet_size = "1MB"
+  max_qos_allowed = 2
+  max_subscriptions = "infinity"
+  max_topic_alias = 1024
+  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 = "disc"
+    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 = "1MB"
+  msg_clear_interval = "0s"
+  msg_expiry_interval = "120s"
+  stop_publish_clear_msg = false
+}
+rule_engine {
+  ignore_sys_message = true
+  jq_function_default_timeout = "10s"
+  jq_implementation_module = "jq_nif"
+  rules {
+    "rule_bx87" {
+      actions = ["webhook:tests"]
+      description = ""
+      metadata {created_at = 1683880400358}
+      sql = "SELECT\n  *\nFROM\n  \"t/#\""
+    }
+  }
+}
+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"
+}

+ 715 - 0
scripts/conf-test/old-confs/e5.0.3.conf

@@ -0,0 +1,715 @@
+node {
+  name = "emqx@127.0.0.1"
+  cookie = "emqxsecretcookie"
+  data_dir = "data"
+}
+
+cluster {
+  name = emqxcl
+  discovery_strategy = manual
+}
+
+
+dashboard {
+    listeners.http {
+        bind = 18083
+    }
+}
+
+authentication = [
+  {
+    backend = "built_in_database"
+    mechanism = "password_based"
+    password_hash_algorithm {name = "sha256", salt_position = "suffix"}
+    user_id_type = "username"
+  }
+]
+authorization {
+  cache {
+    enable = true
+    max_size = 32
+    ttl = "1m"
+  }
+  deny_action = "ignore"
+  no_match = "allow"
+  sources = [
+    {
+      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 = "${EMQX_ETC_DIR}/acl.conf"
+      type = "file"
+    }
+  ]
+}
+delayed {enable = true, max_delayed_messages = 200}
+exhook {
+  servers = [
+    {
+      auto_reconnect = "60s"
+      enable = false
+      failed_action = "deny"
+      name = "test"
+      pool_size = 16
+      request_timeout = "5s"
+      ssl {enable = false, verify = "verify_peer"}
+      url = "http://127.0.0.1:8080"
+    }
+  ]
+}
+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"
+  }
+}
+limiter {
+  bytes_in {burst = "10MB", rate = "10MB/s"}
+  client {
+    bytes_in {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "10KB"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "100KB/s"
+    }
+    connection {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "100"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "100"
+    }
+    internal {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "100"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "100"
+    }
+    message_in {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "100"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "100"
+    }
+    message_routing {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "100"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "100"
+    }
+  }
+  connection {burst = "1000", rate = "1000"}
+  internal {burst = "1000", rate = "1000"}
+  message_in {burst = "1000", rate = "1000"}
+  message_routing {burst = "1000", rate = "1000"}
+}
+listeners {
+  ssl {
+    default {
+      acceptors = 16
+      access_rules = ["allow all"]
+      bind = "0.0.0.0:8883"
+      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 = 5000000
+      mountpoint = ""
+      proxy_protocol = false
+      proxy_protocol_timeout = "3s"
+      ssl_options {
+        cacertfile = "${EMQX_ETC_DIR}/certs/cacert.pem"
+        certfile = "${EMQX_ETC_DIR}/certs/cert.pem"
+        ciphers = []
+        client_renegotiation = true
+        depth = 10
+        enable_crl_check = false
+        fail_if_no_peer_cert = false
+        gc_after_handshake = false
+        handshake_timeout = "15s"
+        hibernate_after = "5s"
+        honor_cipher_order = true
+        keyfile = "${EMQX_ETC_DIR}/certs/key.pem"
+        ocsp {
+          enable_ocsp_stapling = false
+          refresh_http_timeout = "15s"
+          refresh_interval = "5m"
+        }
+        reuse_sessions = true
+        secure_renegotiate = true
+        verify = "verify_none"
+        versions = ["tlsv1.3", "tlsv1.2", "tlsv1.1", "tlsv1"]
+      }
+      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"
+    }
+  }
+  tcp {
+    default {
+      acceptors = 16
+      access_rules = ["allow all"]
+      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 = 12222
+      mountpoint = ""
+      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 {
+      acceptors = 16
+      access_rules = ["allow all"]
+      bind = "0.0.0.0:8083"
+      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 = 5000000
+      mountpoint = ""
+      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
+      }
+      websocket {
+        allow_origin_absence = true
+        check_origin_enable = false
+        check_origins = "http://localhost:18083, http://127.0.0.1:18083"
+        compress = false
+        deflate_opts {
+          client_context_takeover = "takeover"
+          client_max_window_bits = 15
+          mem_level = 8
+          server_context_takeover = "takeover"
+          server_max_window_bits = 15
+          strategy = "default"
+        }
+        fail_if_no_subprotocol = true
+        idle_timeout = "7200s"
+        max_frame_size = "infinity"
+        mqtt_path = "/mqtt"
+        mqtt_piggyback = "multiple"
+        proxy_address_header = "x-forwarded-for"
+        proxy_port_header = "x-forwarded-port"
+        supported_subprotocols = "mqtt, mqtt-v3, mqtt-v3.1.1, mqtt-v5"
+      }
+      zone = "default"
+    }
+  }
+  wss {
+    default {
+      acceptors = 16
+      access_rules = ["allow all"]
+      bind = "0.0.0.0:8084"
+      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 = 5000000
+      mountpoint = ""
+      proxy_protocol = false
+      proxy_protocol_timeout = "3s"
+      ssl_options {
+        cacertfile = "${EMQX_ETC_DIR}/certs/cacert.pem"
+        certfile = "${EMQX_ETC_DIR}/certs/cert.pem"
+        ciphers = []
+        client_renegotiation = true
+        depth = 10
+        fail_if_no_peer_cert = false
+        handshake_timeout = "15s"
+        hibernate_after = "5s"
+        honor_cipher_order = true
+        keyfile = "${EMQX_ETC_DIR}/certs/key.pem"
+        reuse_sessions = true
+        secure_renegotiate = true
+        verify = "verify_none"
+        versions = ["tlsv1.3", "tlsv1.2", "tlsv1.1", "tlsv1"]
+      }
+      tcp_options {
+        active_n = 100
+        backlog = 1024
+        buffer = "4KB"
+        high_watermark = "1MB"
+        nodelay = true
+        reuseaddr = true
+        send_timeout = "15s"
+        send_timeout_close = true
+      }
+      websocket {
+        allow_origin_absence = true
+        check_origin_enable = false
+        check_origins = "http://localhost:18083, http://127.0.0.1:18083"
+        compress = false
+        deflate_opts {
+          client_context_takeover = "takeover"
+          client_max_window_bits = 15
+          mem_level = 8
+          server_context_takeover = "takeover"
+          server_max_window_bits = 15
+          strategy = "default"
+        }
+        fail_if_no_subprotocol = true
+        idle_timeout = "7200s"
+        max_frame_size = "infinity"
+        mqtt_path = "/mqtt"
+        mqtt_piggyback = "multiple"
+        proxy_address_header = "x-forwarded-for"
+        proxy_port_header = "x-forwarded-port"
+        supported_subprotocols = "mqtt, mqtt-v3, mqtt-v3.1.1, mqtt-v5"
+      }
+      zone = "default"
+    }
+  }
+}
+log {
+  console_handler {
+    burst_limit {
+      enable = true
+      max_count = 10000
+      window_time = "1s"
+    }
+    chars_limit = "unlimited"
+    drop_mode_qlen = 3000
+    enable = true
+    flush_qlen = 8000
+    formatter = "text"
+    level = "warning"
+    max_depth = 100
+    overload_kill {
+      enable = true
+      mem_size = "30MB"
+      qlen = "10000"
+      restart_after = "5s"
+    }
+    single_line = true
+    supervisor_reports = "error"
+    sync_mode_qlen = 100
+    time_offset = "system"
+  }
+  file_handlers {
+    default {
+      burst_limit {
+        enable = true
+        max_count = 10000
+        window_time = "1s"
+      }
+      chars_limit = "unlimited"
+      drop_mode_qlen = 3000
+      enable = false
+      file = "${EMQX_LOG_DIR}/emqx.log"
+      flush_qlen = 8000
+      formatter = "text"
+      level = "warning"
+      max_depth = 100
+      max_size = "500MB"
+      overload_kill {
+        enable = true
+        mem_size = "30MB"
+        qlen = 20000
+        restart_after = "5s"
+      }
+      rotation {count = 10, enable = true}
+      single_line = true
+      supervisor_reports = "error"
+      sync_mode_qlen = 100
+      time_offset = "system"
+    }
+  }
+}
+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 = 32
+  max_mqueue_len = 1000
+  max_packet_size = "20MB"
+  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 = "12h"
+  shared_subscription = true
+  strict_mode = false
+  upgrade_qos = false
+  use_username_as_clientid = false
+  wildcard_subscription = true
+}
+retainer {
+  backend {
+    index_specs = [
+      [1, 2, 3],
+      [1, 3],
+      [2, 3],
+      [3]
+    ]
+    max_retained_messages = 0
+    storage_type = "disc"
+    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 = "20MB"
+  msg_clear_interval = "0s"
+  msg_expiry_interval = "0s"
+  stop_publish_clear_msg = false
+}
+sys_topics {
+  sys_event_messages {
+    client_connected = true
+    client_disconnected = true
+    client_subscribed = true
+    client_unsubscribed = false
+  }
+  sys_heartbeat_interval = "30s"
+  sys_msg_interval = "1m"
+}
+sysmon {
+  os {
+    cpu_check_interval = "60s"
+    cpu_high_watermark = "80%"
+    cpu_low_watermark = "60%"
+    mem_check_interval = "60s"
+    procmem_high_watermark = "5%"
+    sysmem_high_watermark = "70%"
+  }
+  vm {
+    busy_dist_port = true
+    busy_port = true
+    large_heap = "disabled"
+    long_gc = "disabled"
+    long_schedule = "240ms"
+    process_check_interval = "30s"
+    process_high_watermark = "80%"
+    process_low_watermark = "60%"
+  }
+}

+ 458 - 0
scripts/conf-test/old-confs/v5.0.20.conf

@@ -0,0 +1,458 @@
+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"
+  },
+  {
+    backend = "mysql"
+    database = "mqtt_user"
+    mechanism = "password_based"
+    password_hash_algorithm {name = "sha256", salt_position = "suffix"}
+    pool_size = 8
+    query = "SELECT password_hash, salt FROM mqtt_user where username = ${username} LIMIT 1"
+    query_timeout = "5s"
+    server = "127.0.0.1:3306"
+    ssl {enable = false, verify = "verify_peer"}
+    username = "root"
+  },
+  {
+    backend = "mongodb"
+    collection = "users"
+    database = "mqtt"
+    filter {username = "${username}"}
+    mechanism = "password_based"
+    mongo_type = "single"
+    password_hash_algorithm {name = "sha256", salt_position = "suffix"}
+    password_hash_field = "password_hash"
+    pool_size = 8
+    salt_field = "salt"
+    server = "127.0.0.1:27017"
+    ssl {enable = false, verify = "verify_peer"}
+    topology {connect_timeout_ms = "20s"}
+  },
+  {
+    backend = "postgresql"
+    database = "mqtt_user"
+    mechanism = "password_based"
+    password_hash_algorithm {name = "sha256", salt_position = "suffix"}
+    pool_size = 8
+    query = "SELECT password_hash, salt FROM mqtt_user where username = ${username} LIMIT 1"
+    server = "127.0.0.1:5432"
+    ssl {enable = false, verify = "verify_peer"}
+    username = "root"
+  },
+  {
+    backend = "redis"
+    cmd = "HMGET mqtt_user:${username} password_hash salt"
+    database = 0
+    mechanism = "password_based"
+    password_hash_algorithm {name = "sha256", salt_position = "suffix"}
+    pool_size = 8
+    redis_type = "single"
+    server = "127.0.0.1:6379"
+    ssl {enable = false, verify = "verify_peer"}
+  },
+  {
+    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 = [
+    {type = "built_in_database"},
+    {
+      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/webhook"
+    }
+  }
+}
+conn_congestion {enable_alarm = true, min_alarm_sustain_duration = "1m"}
+exhook {
+  servers = [
+    {
+      auto_reconnect = "60s"
+      enable = false
+      failed_action = "deny"
+      name = "test"
+      pool_size = 16
+      request_timeout = "5s"
+      ssl {enable = false, verify = "verify_peer"}
+      url = "http://127.0.0.1:8080"
+    }
+  ]
+}
+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 {
+  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 = ""
+  }
+}
+limiter {
+  bytes_in {burst = "0", rate = "infinity"}
+  client {
+    bytes_in {
+      capacity = "infinity"
+      divisible = true
+      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"
+    }
+    internal {
+      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 = "10"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "100"
+    }
+    message_routing {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "0"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "infinity"
+    }
+  }
+  connection {burst = "0", rate = "infinity"}
+  internal {burst = "0", rate = "infinity"}
+  message_in {burst = "100", rate = "1000/s"}
+  message_routing {burst = "0", rate = "infinity"}
+}
+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_kcz2" {
+      actions = ["webhook:test"]
+      description = ""
+      metadata {created_at = 1684227520811}
+      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"
+}

+ 498 - 0
scripts/conf-test/old-confs/v5.0.21.conf

@@ -0,0 +1,498 @@
+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"
+}

+ 502 - 0
scripts/conf-test/old-confs/v5.0.22.conf

@@ -0,0 +1,502 @@
+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"
+  }
+]
+authorization {
+  cache {enable = true}
+  deny_action = "ignore"
+  no_match = "allow"
+  sources = [
+    {
+      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/webhook"
+    }
+  }
+}
+conn_congestion {enable_alarm = true, min_alarm_sustain_duration = "1m"}
+delayed {enable = true, max_delayed_messages = 1000}
+exhook {
+  servers = [
+    {
+      auto_reconnect = "60s"
+      enable = false
+      failed_action = "deny"
+      name = "test"
+      pool_size = 16
+      request_timeout = "5s"
+      ssl {enable = false, verify = "verify_peer"}
+      url = "http://127.0.0.1:8080"
+    }
+  ]
+}
+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 {
+  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 = []
+  }
+}
+limiter {
+  bytes_in {burst = "0", rate = "10MB/s"}
+  client {
+    bytes_in {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "100KB"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "2000"
+    }
+    connection {
+      capacity = "infinity"
+      divisible = false
+      failure_strategy = "force"
+      initial = "0"
+      low_watermark = "0"
+      max_retry_time = "10s"
+      rate = "infinity"
+    }
+    internal {
+      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 {burst = "0", rate = "infinity"}
+  internal {burst = "1000", rate = "1000/s"}
+  message_in {burst = "0", rate = "infinity"}
+  message_routing {burst = "0", rate = "2000/m"}
+}
+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 {bind = "0.0.0.0:1883", max_connections = 1024000}
+  }
+  ws {
+    default {
+      acceptors = 32
+      bind = "0.0.0.0:8083"
+      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
+      }
+      websocket {
+        allow_origin_absence = true
+        check_origin_enable = false
+        check_origins = "http://localhost:18083, http://127.0.0.1:18083"
+        compress = false
+        deflate_opts {
+          client_context_takeover = "takeover"
+          client_max_window_bits = 15
+          mem_level = 8
+          server_context_takeover = "takeover"
+          server_max_window_bits = 15
+          strategy = "default"
+        }
+        fail_if_no_subprotocol = true
+        idle_timeout = "7200s"
+        max_frame_size = "infinity"
+        mqtt_path = "/mqtt"
+        mqtt_piggyback = "multiple"
+        proxy_address_header = "x-forwarded-for"
+        proxy_port_header = "x-forwarded-port"
+        supported_subprotocols = "mqtt, mqtt-v3, mqtt-v3.1.1, mqtt-v5"
+      }
+      zone = "default"
+    }
+  }
+  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"}
+    }
+  }
+}
+log {
+  console_handler {
+    burst_limit {
+      enable = true
+      max_count = 10000
+      window_time = "1s"
+    }
+    chars_limit = 1000
+    drop_mode_qlen = 3000
+    enable = true
+    flush_qlen = 8000
+    formatter = "text"
+    level = "warning"
+    max_depth = "unlimited"
+    overload_kill {
+      enable = true
+      mem_size = "30MB"
+      qlen = 20000
+      restart_after = "5s"
+    }
+    single_line = true
+    supervisor_reports = "error"
+    sync_mode_qlen = 100
+    time_offset = "system"
+  }
+  file_handlers {
+    default {
+      burst_limit {
+        enable = true
+        max_count = 10000
+        window_time = "1s"
+      }
+      chars_limit = "unlimited"
+      drop_mode_qlen = 3000
+      enable = false
+      file = "log/emqx.log"
+      flush_qlen = 8000
+      formatter = "text"
+      level = "warning"
+      max_depth = 100
+      max_size = "50MB"
+      overload_kill {
+        enable = true
+        mem_size = "30MB"
+        qlen = 20000
+        restart_after = "5s"
+      }
+      rotation {count = 10, enable = true}
+      single_line = true
+      supervisor_reports = "error"
+      sync_mode_qlen = 100
+      time_offset = "system"
+    }
+  }
+}
+mqtt {
+  await_rel_timeout = "300s"
+  exclusive_subscription = true
+  idle_timeout = "15s"
+  ignore_loop_deliver = true
+  keepalive_backoff = 1
+  max_awaiting_rel = 100
+  max_clientid_len = 65535
+  max_inflight = 32
+  max_mqueue_len = 1000
+  max_packet_size = "10MB"
+  max_qos_allowed = 2
+  max_subscriptions = 2000
+  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 = 20
+  session_expiry_interval = "2h"
+  shared_subscription = true
+  strict_mode = false
+  upgrade_qos = true
+  use_username_as_clientid = true
+  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 = 2000
+    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 = "1MB"
+  msg_clear_interval = "2000ms"
+  msg_expiry_interval = "1000ms"
+  stop_publish_clear_msg = false
+}
+rule_engine {
+  ignore_sys_message = true
+  jq_function_default_timeout = "10s"
+  rules {
+    "rule_fhd9" {
+      actions = ["webhook:test"]
+      description = ""
+      metadata {created_at = 1684225481677}
+      sql = "SELECT\n  *\nFROM\n  \"t/#\""
+    }
+  }
+}
+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"
+}
+sysmon {
+  os {
+    cpu_check_interval = "60s"
+    cpu_high_watermark = "80%"
+    cpu_low_watermark = "60%"
+    mem_check_interval = "60s"
+    procmem_high_watermark = "5%"
+    sysmem_high_watermark = "70%"
+  }
+  top {
+    db_hostname = ""
+    db_name = "postgres"
+    db_password = "******"
+    db_port = 5432
+    db_username = "system_monitor"
+    max_procs = 1000000
+    num_items = 10
+    sample_interval = "2s"
+  }
+  vm {
+    busy_dist_port = false
+    busy_port = false
+    large_heap = "disabled"
+    long_gc = "disabled"
+    long_schedule = "disabled"
+    process_check_interval = "30s"
+    process_high_watermark = "80%"
+    process_low_watermark = "60%"
+  }
+}

+ 280 - 0
scripts/conf-test/old-confs/v5.0.23.conf

@@ -0,0 +1,280 @@
+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 = [
+  {
+    algorithm = "hmac-based"
+    from = "password"
+    mechanism = "jwt"
+    secret = "emqxsecret"
+    "secret_base64_encoded" = false
+    use_jwks = false
+    verify_claims {}
+  }
+]
+authorization {
+  cache {enable = true}
+  deny_action = "ignore"
+  no_match = "allow"
+  sources = [
+    {type = "built_in_database"},
+    {
+      enable = true
+      path = "etc/acl.conf"
+      type = "file"
+    }
+  ]
+}
+bridges {
+  mqtt {
+    "to-public-broker" {
+      bridge_mode = false
+      clean_start = true
+      egress {
+        local {topic = "t/#"}
+        remote {
+          payload = "${payload}"
+          qos = 1
+          retain = false
+          topic = "b/t"
+        }
+      }
+      enable = true
+      keepalive = "300s"
+      mode = "cluster_shareload"
+      proto_ver = "v4"
+      resource_opts {
+        auto_restart_interval = "60s"
+        health_check_interval = "15s"
+        inflight_window = 100
+        max_buffer_bytes = "1GB"
+        query_mode = "async"
+        request_timeout = "15s"
+        worker_pool_size = 4
+      }
+      retry_interval = "15s"
+      server = "broker.emqx.io:1883"
+      ssl {enable = false, verify = "verify_peer"}
+    }
+  }
+}
+exhook {
+  servers = [
+    {
+      auto_reconnect = "60s"
+      enable = false
+      failed_action = "deny"
+      name = "test"
+      pool_size = 16
+      request_timeout = "5s"
+      ssl {enable = false, verify = "verify_peer"}
+      url = "http://127.0.0.1:8080/exhook"
+    }
+  ]
+}
+gateway {
+  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 = []
+  }
+}
+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 {rate = "infinity"}
+        client {
+          bytes {rate = "infinity"}
+          messages {rate = "infinity"}
+        }
+        messages {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 = true
+  idle_timeout = "15s"
+  ignore_loop_deliver = true
+  keepalive_backoff = 1
+  max_awaiting_rel = 100
+  max_clientid_len = 65535
+  max_inflight = 32
+  max_mqueue_len = 1000
+  max_packet_size = "1MB"
+  max_qos_allowed = 2
+  max_subscriptions = 100
+  max_topic_alias = 65535
+  max_topic_levels = 128
+  mqueue_default_priority = "lowest"
+  mqueue_priorities = "disabled"
+  "mqueue_store_qos0" = true
+  peer_cert_as_clientid = "cn"
+  peer_cert_as_username = "cn"
+  response_information = ""
+  retain_available = true
+  retry_interval = "30s"
+  server_keepalive = 200
+  session_expiry_interval = "2h"
+  shared_subscription = true
+  strict_mode = true
+  upgrade_qos = true
+  use_username_as_clientid = true
+  wildcard_subscription = true
+}
+retainer {
+  backend {
+    index_specs = [
+      [1, 2, 3],
+      [1, 3],
+      [2, 3],
+      [3]
+    ]
+    max_retained_messages = 1000
+    storage_type = "ram"
+    type = "built_in_database"
+  }
+  enable = true
+  max_payload_size = "1MB"
+  msg_clear_interval = "20000ms"
+  msg_expiry_interval = "10000ms"
+  stop_publish_clear_msg = false
+}
+rule_engine {
+  ignore_sys_message = true
+  jq_function_default_timeout = "10s"
+  rules {
+    rule_tcbl {
+      actions = ["mqtt:to-public-broker"]
+      description = ""
+      metadata {created_at = 1684223521242}
+      sql = "SELECT\n  *\nFROM\n  \"t/#\""
+    }
+  }
+}
+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"
+}
+sysmon {
+  os {
+    cpu_check_interval = "60s"
+    cpu_high_watermark = "80%"
+    cpu_low_watermark = "60%"
+    mem_check_interval = "60s"
+    procmem_high_watermark = "5%"
+    sysmem_high_watermark = "70%"
+  }
+  top {
+    db_hostname = ""
+    db_name = "postgres"
+    db_password = "******"
+    db_port = 5432
+    db_username = "system_monitor"
+    max_procs = 1000000
+    num_items = 10
+    sample_interval = "2s"
+  }
+  vm {
+    busy_dist_port = true
+    busy_port = true
+    large_heap = "32MB"
+    long_gc = "100ms"
+    long_schedule = "240ms"
+    process_check_interval = "30s"
+    process_high_watermark = "80%"
+    process_low_watermark = "60%"
+  }
+}

+ 295 - 0
scripts/conf-test/old-confs/v5.0.24.conf

@@ -0,0 +1,295 @@
+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
+}
+
+authentication = [
+  {
+    backend = "built_in_database"
+    mechanism = "password_based"
+    password_hash_algorithm {name = "sha256", salt_position = "suffix"}
+    user_id_type = "username"
+  }
+]
+authorization {
+  cache {enable = true}
+  deny_action = "ignore"
+  no_match = "allow"
+  sources = [
+    {
+      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/webhook"
+    }
+  }
+}
+exhook {
+  servers = [
+    {
+      auto_reconnect = "60s"
+      enable = false
+      failed_action = "deny"
+      name = "test"
+      pool_size = 16
+      request_timeout = "5s"
+      ssl {enable = false, verify = "verify_peer"}
+      url = "http://127.0.0.1:8080"
+    }
+  ]
+}
+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"
+  }
+}
+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 = 16
+      bind = "0.0.0.0:1883"
+      enable_authn = true
+      enabled = true
+      limiter {
+        bytes {rate = "infinity"}
+        client {
+          bytes {rate = "infinity"}
+          messages {rate = "infinity"}
+        }
+        messages {rate = "infinity"}
+      }
+      max_connections = 5000
+      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"}
+    }
+  }
+}
+log {
+  console_handler {
+    burst_limit {
+      enable = true
+      max_count = 10000
+      window_time = "1s"
+    }
+    chars_limit = "unlimited"
+    drop_mode_qlen = 3000
+    enable = true
+    flush_qlen = 8000
+    formatter = "text"
+    level = "warning"
+    max_depth = 100
+    overload_kill {
+      enable = true
+      mem_size = "30MB"
+      qlen = "10000"
+      restart_after = "5s"
+    }
+    single_line = true
+    supervisor_reports = "error"
+    sync_mode_qlen = 100
+    time_offset = "system"
+  }
+  file_handlers {
+    default {
+      burst_limit {
+        enable = true
+        max_count = 10000
+        window_time = "1s"
+      }
+      chars_limit = "unlimited"
+      drop_mode_qlen = 3000
+      enable = false
+      file = "log/emqx.log"
+      flush_qlen = 8000
+      formatter = "text"
+      level = "info"
+      max_depth = 100
+      max_size = "50MB"
+      overload_kill {
+        enable = true
+        mem_size = "30MB"
+        qlen = 20000
+        restart_after = "5s"
+      }
+      rotation {count = 10, enable = true}
+      single_line = true
+      supervisor_reports = "error"
+      sync_mode_qlen = 100
+      time_offset = "system"
+    }
+  }
+}
+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 = 32
+  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 = "12h"
+  shared_subscription = true
+  strict_mode = false
+  upgrade_qos = false
+  use_username_as_clientid = false
+  wildcard_subscription = true
+}
+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
+  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"
+  rules {
+    "rule_s56b" {
+      actions = ["webhook:test"]
+      description = ""
+      metadata {created_at = 1683882654432}
+      sql = "SELECT\n  *\nFROM\n  \"t/#\""
+    }
+  }
+}
+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"
+}

+ 437 - 0
scripts/conf-test/old-confs/v5.0.25.conf

@@ -0,0 +1,437 @@
+node {
+  name = "emqx@127.0.0.1"
+  cookie = "emqxsecretcookie"
+  data_dir = "data"
+}
+
+cluster {
+  name = emqxcl
+  discovery_strategy = manual
+}
+
+
+dashboard {
+    listeners.http {
+        bind = 18083
+    }
+}
+
+authentication = [
+  {
+    backend = "built_in_database"
+    mechanism = "password_based"
+    password_hash_algorithm {name = "sha256", salt_position = "suffix"}
+    user_id_type = "username"
+  }
+]
+authorization {
+  cache {
+    enable = true
+    max_size = 32
+    ttl = "1m"
+  }
+  deny_action = "ignore"
+  no_match = "allow"
+  sources = [
+    {
+      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 = "${EMQX_ETC_DIR}/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 {
+        auto_restart_interval = "60s"
+        health_check_interval = "15s"
+        inflight_window = 100
+        max_buffer_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/webhook"
+    }
+  }
+}
+delayed {enable = false, max_delayed_messages = 2000}
+exhook {
+  servers = [
+    {
+      auto_reconnect = "60s"
+      enable = false
+      failed_action = "deny"
+      name = "test"
+      pool_size = 16
+      request_timeout = "5s"
+      ssl {enable = false, verify = "verify_peer"}
+      url = "http://127.0.0.1:8080"
+    }
+  ]
+}
+gateway {
+  "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/"
+  }
+}
+limiter {max_conn_rate = "2000/s"}
+listeners {
+  ssl {
+    default {
+      acceptors = 16
+      access_rules = ["allow all"]
+      bind = "0.0.0.0:8883"
+      enable_authn = true
+      enabled = true
+      max_connections = 5000000
+      mountpoint = ""
+      proxy_protocol = false
+      proxy_protocol_timeout = "3s"
+      ssl_options {
+        cacertfile = "${EMQX_ETC_DIR}/certs/cacert.pem"
+        certfile = "${EMQX_ETC_DIR}/certs/cert.pem"
+        ciphers = []
+        client_renegotiation = true
+        depth = 10
+        enable_crl_check = false
+        fail_if_no_peer_cert = false
+        gc_after_handshake = false
+        handshake_timeout = "15s"
+        hibernate_after = "5s"
+        honor_cipher_order = true
+        keyfile = "${EMQX_ETC_DIR}/certs/key.pem"
+        ocsp {
+          enable_ocsp_stapling = false
+          refresh_http_timeout = "15s"
+          refresh_interval = "5m"
+        }
+        reuse_sessions = true
+        secure_renegotiate = true
+        verify = "verify_none"
+        versions = ["tlsv1.3", "tlsv1.2"]
+      }
+      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"
+    }
+  }
+  tcp {
+    default {
+      acceptors = 16
+      access_rules = ["allow all"]
+      bind = "0.0.0.0:1883"
+      enable_authn = true
+      enabled = true
+      max_connections = 5000000
+      mountpoint = ""
+      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 {
+      acceptors = 32
+      access_rules = ["allow all"]
+      bind = "0.0.0.0:8083"
+      enable_authn = true
+      enabled = true
+      max_connections = 5000000
+      mountpoint = ""
+      proxy_protocol = false
+      proxy_protocol_timeout = "3s"
+      tcp_options {
+        active_n = 100
+        backlog = 1024
+        buffer = "40KB"
+        high_watermark = "1MB"
+        nodelay = true
+        reuseaddr = true
+        send_timeout = "15s"
+        send_timeout_close = true
+      }
+      websocket {
+        allow_origin_absence = true
+        check_origin_enable = false
+        check_origins = "http://localhost:18083, http://127.0.0.1:18083"
+        compress = false
+        deflate_opts {
+          client_context_takeover = "takeover"
+          client_max_window_bits = 15
+          mem_level = 8
+          server_context_takeover = "takeover"
+          server_max_window_bits = 15
+          strategy = "default"
+        }
+        fail_if_no_subprotocol = true
+        idle_timeout = "7200s"
+        max_frame_size = "infinity"
+        mqtt_path = "/mqtt"
+        mqtt_piggyback = "multiple"
+        proxy_address_header = "x-forwarded-for"
+        proxy_port_header = "x-forwarded-port"
+        supported_subprotocols = "mqtt, mqtt-v3, mqtt-v3.1.1, mqtt-v5"
+      }
+      zone = "default"
+    }
+  }
+  wss {
+    default {
+      acceptors = 16
+      access_rules = ["allow all"]
+      bind = "0.0.0.0:8084"
+      enable_authn = true
+      enabled = true
+      max_connections = 5000000
+      mountpoint = ""
+      proxy_protocol = false
+      proxy_protocol_timeout = "3s"
+      ssl_options {
+        cacertfile = "${EMQX_ETC_DIR}/certs/cacert.pem"
+        certfile = "${EMQX_ETC_DIR}/certs/cert.pem"
+        ciphers = []
+        client_renegotiation = true
+        depth = 10
+        fail_if_no_peer_cert = false
+        handshake_timeout = "15s"
+        hibernate_after = "5s"
+        honor_cipher_order = true
+        keyfile = "${EMQX_ETC_DIR}/certs/key.pem"
+        reuse_sessions = true
+        secure_renegotiate = true
+        verify = "verify_none"
+        versions = ["tlsv1.3", "tlsv1.2"]
+      }
+      tcp_options {
+        active_n = 100
+        backlog = 1024
+        buffer = "4KB"
+        high_watermark = "1MB"
+        nodelay = true
+        reuseaddr = true
+        send_timeout = "15s"
+        send_timeout_close = true
+      }
+      websocket {
+        allow_origin_absence = true
+        check_origin_enable = false
+        check_origins = "http://localhost:18083, http://127.0.0.1:18083"
+        compress = false
+        deflate_opts {
+          client_context_takeover = "takeover"
+          client_max_window_bits = 15
+          mem_level = 8
+          server_context_takeover = "takeover"
+          server_max_window_bits = 15
+          strategy = "default"
+        }
+        fail_if_no_subprotocol = true
+        idle_timeout = "7200s"
+        max_frame_size = "infinity"
+        mqtt_path = "/mqtt"
+        mqtt_piggyback = "multiple"
+        proxy_address_header = "x-forwarded-for"
+        proxy_port_header = "x-forwarded-port"
+        supported_subprotocols = "mqtt, mqtt-v3, mqtt-v3.1.1, mqtt-v5"
+      }
+      zone = "default"
+    }
+  }
+}
+log {
+  console_handler {
+    burst_limit {
+      enable = true
+      max_count = 10000
+      window_time = "1s"
+    }
+    chars_limit = 10000
+    drop_mode_qlen = 3000
+    enable = true
+    flush_qlen = 8000
+    formatter = "text"
+    level = "info"
+    max_depth = 100
+    overload_kill {
+      enable = true
+      mem_size = "30MB"
+      qlen = 20000
+      restart_after = "5s"
+    }
+    single_line = true
+    supervisor_reports = "error"
+    sync_mode_qlen = 100
+    time_offset = "system"
+  }
+  file_handlers {
+    default {
+      burst_limit {
+        enable = true
+        max_count = 10000
+        window_time = "1s"
+      }
+      chars_limit = "unlimited"
+      drop_mode_qlen = 3000
+      enable = false
+      file = "${EMQX_LOG_DIR}/emqx.log"
+      flush_qlen = 8000
+      formatter = "text"
+      level = "warning"
+      max_depth = 100
+      max_size = "50MB"
+      overload_kill {
+        enable = true
+        mem_size = "30MB"
+        qlen = 20000
+        restart_after = "5s"
+      }
+      rotation {count = 10, enable = true}
+      single_line = true
+      supervisor_reports = "error"
+      sync_mode_qlen = 100
+      time_offset = "system"
+    }
+  }
+}
+mqtt {
+  await_rel_timeout = "300s"
+  exclusive_subscription = true
+  idle_timeout = "15s"
+  ignore_loop_deliver = true
+  keepalive_backoff = 1
+  max_awaiting_rel = 100
+  max_clientid_len = 65535
+  max_inflight = 32
+  max_mqueue_len = 1000
+  max_packet_size = "10MB"
+  max_qos_allowed = 2
+  max_subscriptions = 15
+  max_topic_alias = 65535
+  max_topic_levels = 128
+  mqueue_default_priority = "lowest"
+  mqueue_priorities = "disabled"
+  "mqueue_store_qos0" = true
+  peer_cert_as_clientid = "cn"
+  peer_cert_as_username = "cn"
+  response_information = ""
+  retain_available = true
+  retry_interval = "30s"
+  server_keepalive = 15
+  session_expiry_interval = "2h"
+  shared_subscription = true
+  strict_mode = true
+  upgrade_qos = true
+  use_username_as_clientid = true
+  wildcard_subscription = true
+}
+retainer {
+  backend {
+    index_specs = [
+      [1, 2, 3],
+      [1, 3],
+      [2, 3],
+      [3]
+    ]
+    max_retained_messages = 120
+    storage_type = "ram"
+    type = "built_in_database"
+  }
+  enable = true
+  max_payload_size = "1MB"
+  msg_clear_interval = "2000ms"
+  msg_expiry_interval = "10000ms"
+  stop_publish_clear_msg = false
+}
+rule_engine {
+  ignore_sys_message = true
+  jq_function_default_timeout = "10s"
+  rules {
+    "rule_t7cl" {
+      actions = ["webhook:test"]
+      description = ""
+      metadata {created_at = 1684222459298}
+      sql = "SELECT\n  *\nFROM\n  \"t/#\""
+    }
+  }
+}
+slow_subs {
+  enable = true
+  expire_interval = "3000s"
+  stats_type = "internal"
+  threshold = "5000ms"
+  top_k_num = 1000
+}
+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"
+}

+ 35 - 0
scripts/conf-test/run.sh

@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+PROFILE="${PROFILE:-emqx}"
+EMQX_ROOT="${EMQX_ROOT:-_build/$PROFILE/rel/emqx}"
+EMQX_WAIT_FOR_START="${EMQX_WAIT_FOR_START:-30}"
+export EMQX_WAIT_FOR_START
+
+start_emqx_with_conf() {
+    echo "Starting $PROFILE with $1"
+    "$EMQX_ROOT"/bin/emqx start
+    "$EMQX_ROOT"/bin/emqx stop
+}
+
+MINOR_VSN=$(./pkg-vsn.sh "$PROFILE" | cut -d. -f1,2)
+
+if [ "$PROFILE" = "emqx" ]; then
+  PREFIX="v"
+else
+  PREFIX="e"
+fi
+
+FILES=$(ls ./scripts/conf-test/old-confs/$PREFIX"$MINOR_VSN"*)
+
+cp "$EMQX_ROOT"/etc/emqx.conf "$EMQX_ROOT"/etc/emqx.conf.bak
+cleanup() {
+    cp "$EMQX_ROOT"/etc/emqx.conf.bak "$EMQX_ROOT"/etc/emqx.conf
+}
+trap cleanup EXIT
+
+for file in $FILES; do
+    cp "$file" "$EMQX_ROOT"/etc/emqx.conf
+    start_emqx_with_conf "$file"
+done