HTTP API 与 CLI 管理插件

emqx_management HTTP API 与 CLI 管理插件 - 图1 (opens new window) 是 EMQ X 消息服务器的 HTTP API 与 CLI 管理插件,该插件默认开启。当 EMQ X 启动成功后,用户即可通过该插件提供的 HTTP API 与 CLI 进行查询当前客户端列表等操作,详见 rest_apicommands

HTTP API 与 CLI 管理设置

etc/plugins/emqx_management.conf:

  1. ## 最多返回多少条数据,用于分页机制
  2. management.max_row_limit = 10000
  3. ## 默认的应用 secret
  4. # management.application.default_secret = public
  5. ## Management HTTP 服务器端口配置
  6. management.listener.http = 8080
  7. management.listener.http.acceptors = 2
  8. management.listener.http.max_clients = 512
  9. management.listener.http.backlog = 512
  10. management.listener.http.send_timeout = 15s
  11. management.listener.http.send_timeout_close = on
  12. ## Management HTTPS 服务器端口配置
  13. ## management.listener.https = 8081
  14. ## management.listener.https.acceptors = 2
  15. ## management.listener.https.max_clients = 512
  16. ## management.listener.https.backlog = 512
  17. ## management.listener.https.send_timeout = 15s
  18. ## management.listener.https.send_timeout_close = on
  19. ## management.listener.https.certfile = etc/certs/cert.pem
  20. ## management.listener.https.keyfile = etc/certs/key.pem
  21. ## management.listener.https.cacertfile = etc/certs/cacert.pem
  22. ## management.listener.https.verify = verify_peer
  23. ## management.listener.https.fail_if_no_peer_cert = true