当前位置: 首页 > article >正文

EMQX5.X版本性能配置调优参数

EMQX 主配置文件为 emqx.conf,根据安装方式其所在位置有所不同:

安装方式配置文件所在位置
DEB 或 RPM 包安装/etc/emqx/emqx.conf
Docker 容器/opt/emqx/etc/emqx.conf
解压缩包安装./etc/emqx.conf

EMQ X 消息服务器默认占用的 TCP 端口包括:

端口

说明

1883

MQTT 协议端口

8883

MQTT/SSL 端口

8083

MQTT/WebSocket 端口

8080

HTTP API 端口

18083

Dashboard 管理控制台端口

## NOTE:
## Configs in this file might be overridden by:
## 1. Environment variables which start with 'EMQX_' prefix
## 2. File $EMQX_NODE__DATA_DIR/configs/cluster-override.conf
## 3. File $EMQX_NODE__DATA_DIR/configs/local-override.conf
##
## The *-override.conf files are overwritten at runtime when changes
## are made from EMQX dashboard UI, management HTTP API, or CLI.
## All configuration details can be found in emqx.conf.example

node {
  name = "emqx@127.0.0.1"
  cookie = "emqxsecretcookie"
  data_dir = "/var/lib/emqx"
}

log {
  file_handlers.default {
    level = warning
    file = "/var/log/emqx/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/emqx/certs/key.pem"
    certfile = "/etc/emqx/certs/cert.pem"
    cacertfile = "/etc/emqx/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/emqx/certs/key.pem"
    certfile = "/etc/emqx/certs/cert.pem"
    cacertfile = "/etc/emqx/certs/cacert.pem"
  }
}

# listeners.quic.default {
#  enabled = true
#  bind = "0.0.0.0:14567"
#  max_connections = 1024000
#  keyfile = "/etc/emqx/certs/key.pem"
#  certfile = "/etc/emqx/certs/cert.pem"
#}

dashboard {
    listeners.http {
        bind = 18083
    }
    default_username = "admin"
    default_password = "public"
}

authorization {
  deny_action = ignore
  no_match = allow
  cache = { enable = true }
  sources =  [
    {
      type = file
      enable = true
      # This file is immutable to EMQX.
      # Once new rules are created from dashboard UI or HTTP API,
      # the file 'data/authz/acl.conf' is used instead of this one
      path = "/etc/emqx/acl.conf"
    }
  ]
}


http://www.kler.cn/a/457326.html

相关文章:

  • ubuntu支持ssh
  • 线性代数自学资源推荐我的个人学习心得
  • ACM算法模板
  • C++ hashtable
  • 神经网络入门实战:(二十三)使用本地数据集进行训练和验证
  • 洛谷P1525 [NOIP2010 提高组] 关押罪犯(种子并查集基础)
  • NSSCTF-web刷题
  • 爬虫入门二 beautifulsoup
  • 一个通用的居于 OAuth2的API集成方案
  • 解密MQTT协议:从QOS到消息传递的全方位解析
  • Element分阶段逐步升级
  • (计算机毕设)基于SpringBoot+Vue的在线音乐平台
  • K8s Flannel vs Calico:基于 L2 与 L3 的 CNI 之战(一)
  • DINO: 基于双向知识蒸馏的视觉智能自学习方法
  • 设计模式之状态模式:自动售货机的喜怒哀乐
  • 通过 python 获取金融数据-akshare
  • ESP32_H2(IDF)学习系列-ADC模数转换(单次转换)
  • 将 ASP.NET Core 应用程序的日志保存到 D 盘的文件中 (如 Serilog)
  • 【2025最新计算机毕业设计】基于SpringBoot+Vue体育资讯系统(可定制,项目包括源码、文档、远程调试、免费答疑至毕业】
  • 12.28作业
  • Etcd静态分布式集群搭建
  • 深度学习在数据库运维中的作用与实现
  • 解决GPT公式复制到Word之后乱码问题
  • SPI机制
  • YOLO11全解析:从原理到实战,全流程体验下一代目标检测
  • Spring Boot使用多线程