actions {
  http {
    emq_webhook_WH_D {
      connector = connector_emq_webhook_WH_D
      enable = true
      parameters {
        headers {}
        max_retries = 2
        method = post
        path = ""
      }
      resource_opts {
        health_check_interval = 15s
        inflight_window = 100
        max_buffer_bytes = 1GB
        query_mode = async
        request_ttl = 45s
        start_after_created = true
        start_timeout = 5s
        worker_pool_size = 4
      }
    }
  }
}
authentication = [
  {
    backend = http
    body {
      clientid = "${clientid}"
      password = "${password}"
      username = "${username}"
    }
    connect_timeout = 15s
    enable = true
    enable_pipelining = 100
    headers {
      accept = "application/json"
      cache-control = no-cache
      connection = keep-alive
      content-type = "application/json"
      keep-alive = "timeout=30, max=1000"
    }
    mechanism = password_based
    method = post
    pool_size = 8
    request_timeout = 5s
    ssl {
      ciphers = []
      depth = 10
      enable = false
      hibernate_after = 5s
      log_level = notice
      reuse_sessions = true
      secure_renegotiate = true
      verify = verify_peer
      versions = [tlsv1.3, tlsv1.2]
    }
    url = "http://127.0.0.1:3001/emq_auth"
  }
]
authorization {
  cache {
    enable = true
    max_size = 32
    ttl = 1m
  }
  deny_action = ignore
  no_match = allow
  sources = [
    {
      enable = false
      path = "data/authz/acl.conf"
      type = file
    }
  ]
}
connectors {
  http {
    connector_emq_webhook_WH_D {
      connect_timeout = 15s
      enable = true
      enable_pipelining = 100
      headers {content-type = "application/json"}
      pool_size = 8
      pool_type = hash
      ssl {
        ciphers = []
        depth = 10
        enable = false
        hibernate_after = 5s
        log_level = notice
        reuse_sessions = true
        secure_renegotiate = true
        verify = verify_peer
        versions = [tlsv1.3, tlsv1.2]
      }
      url = "http://127.0.0.1:3001/emq_webhook"
    }
  }
}
rule_engine {
  ignore_sys_message = true
  jq_function_default_timeout = 10s
  rules {
    emq_webhook_WH_D {
      actions = ["webhook:emq_webhook_WH_D"]
      description = "事件监控"
      enable = true
      metadata {created_at = 1770559256949}
      sql = "SELECT\n  *\nFROM\n  \"$events/client_disconnected\",\n  \"$events/client_connack\""
    }
  }
}
