83 Star 830 Fork 282

quickmsg / mqtt-cluster

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
Clone or Download
config.yaml 3.61 KB
Copy Edit Web IDE Raw Blame History
护国神将-小将 authored 2022-12-12 18:19 . 解决hex格式
smqtt:
logLevel: INFO # 系统日志
tcp: # tcp配置
connectModel: KICK # UNIQUE 唯一 KICK 互踢
notKickSecond: 30 # KICK互踢模式生效, 单位秒, 指定时间内客户端不互踢, 避免客户端自动连接持续互踢
port: 1883 # mqtt端口号
wiretap: false # 二进制日志 前提是 smqtt.logLevel = DEBUG
bossThreadSize: 1 # boss线程 默认=1
workThreadSize: 9 # work线程 默认=cpu核心数+1
businessThreadSize: 8 # 业务线程数 默认=cpu核心数
businessQueueSize: 100000 #业务队列 默认=100000
messageMaxSize: 4194304 # 接收消息的最大限制 默认4194304(4M)
lowWaterMark: 4000000 # 不建议配置 默认 32768
highWaterMark: 80000000 # 不建议配置 默认 65536
# globalReadWriteSize: 10000000,100000000 全局读写大小限制
# channelReadWriteSize: 10000000,100000000 单个channel读写大小限制
options:
SO_BACKLOG: 2000
# ssl: # ssl配置
# enable: false # 开关
# key: /user/server.key # 指定ssl文件 默认系统生成
# crt: /user/server.crt # 指定ssl文件 默认系统生成
# ca: /user/server.ca # ca证书 双向加密配置
acl:
aclPolicy: NONE # NONE or FILE or JDBC
filePath: D:\smqtt\config\acl\basic_policy.csv # FILE时配置filePath
jdbcAclConfig:
driver: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/smqtt
username: root
password: 123
http: # http相关配置 端口固定60000
enable: true # 开关
accessLog: true # http访问日志
ssl: # ssl配置
enable: false
admin: # 后台管理配置
enable: true # 开关
username: smqtt # 访问用户名
password: smqtt # 访问密码
auth:
fixed:
username: smqtt
password: smqtt
ws: # websocket配置
enable: true # 开关
port: 8999 # 端口
path: /mqtt # ws 的访问path mqtt.js请设置此选项
cluster: # 集群配置
enable: false # 集群开关
url: 127.0.0.1:7771,127.0.0.1:7772 # 启动节点
port: 7771 # 端口
node: node-1 # 集群节点名称 唯一
namespace: smqtt
external:
host: localhost # 用于映射容器ip 请不要随意设置,如果不需要请移除此选项
port: 7777 # 用于映射容器端口 请不要随意设置,如果不需要请移除此选项
meter:
meterType: PROMETHEUS # INFLUXDB , PROMETHEUS
db: # 参数值配置参考https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration
jdbcUrl: jdbc:mysql://localhost:3306/smqtt
username: root
password: 123
dataSourceCachePrepStmts: false
dataSourcePrepStmtCacheSize: 250
dataSourcePrepStmtCacheSqlLimit: 2048
dataSourceUseServerPrepStmts: true
dataSourceUseLocalSessionState: true
dataSourceRewriteBatchedStatements: true
dataSourceCacheResultSetMetadata: true
dataSourceCacheServerConfiguration: true
dataSourceElideSetAutoCommits: true
dataSourceMaintainTimeStats: false
redis: # redis 请参考 https://wiki.smqtt.cc/%E5%85%B6%E4%BB%96/1.store.html 【如果没有引入相关依赖请移除此配置】
mode: single
database: 0
password:
timeout: 3000
poolMinIdle: 8
poolConnTimeout: 3000
poolSize: 10
single:
address: 127.0.0.1:6379
cluster:
scanInterval: 1000
nodes: 127.0.0.1:7000,127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003,127.0.0.1:7004,127.0.0.1:7005
readMode: SLAVE
retryAttempts: 3
slaveConnectionPoolSize: 64
masterConnectionPoolSize: 64
retryInterval: 1500
sentinel:
master: mymaster
nodes: 127.0.0.1:26379,127.0.0.1:26379,127.0.0.1:26379
Java
1
https://gitee.com/quickmsg/mqtt-cluster.git
git@gitee.com:quickmsg/mqtt-cluster.git
quickmsg
mqtt-cluster
mqtt-cluster
main

Search