# 节点配置
node.name = "emqx@127.0.0.1"
node.cookie = "aBcDeFgHiJkLmNoPqRsTuVwXyZ012345"
node.data_dir = "/opt/emqx/data"

# 日志配置
log.console = {level = info, enable = true}
log.file = {path = "/opt/emqx/log/emqx.log", enable = true, level = info}

# MQTT TCP 监听器
listeners.tcp.default = {bind = "0.0.0.0:1883", max_connections = 1000000, enable = true}

# MQTT SSL 监听器
listeners.ssl.default = {bind = "0.0.0.0:8883", enable = false}

# MQTT WebSocket 监听器
listeners.ws.default = {bind = "0.0.0.0:8083", enable = true}

# MQTT WebSocket SSL 监听器
listeners.wss.default = {bind = "0.0.0.0:8084", enable = false}

# 管理控制台
dashboard.listeners.http = {bind = "0.0.0.0:18083", enable = true}

# HTTP API
management.listeners.http = {bind = "0.0.0.0:8081", enable = true}

# 认证配置
authentication = [
  {enable = true, mechanism = password_based, backend = built_in_database, user_id_type = username}
]

# 授权配置
authorization.sources = [{type = built_in_database, enable = true}]

# 持久化消息存储
message.storage.backend = built_in_database