Skip to content

Commit

Permalink
Merge pull request #72 from mqttsnet/release/1.2.0
Browse files Browse the repository at this point in the history
Release/1.2.0
  • Loading branch information
xiaonannet authored May 10, 2024
2 parents 581ebe2 + e6234f1 commit d8187b0
Show file tree
Hide file tree
Showing 1,683 changed files with 345,542 additions and 5,539 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ Thanks these wonderful people, welcome to join us:
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/llJam"><img src="https://avatars.githubusercontent.com/u/113015997?v=4" width="100px;" alt="llJam"/><br /><sub><b>llJam</b></sub></a><br /><a href="https://github.com/mqttsnet/thinglinks/commits?author=llJam" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/qianmenfei"><img src="https://avatars.githubusercontent.com/u/39989430?v=4" width="100px;" alt="qianmenfei"/><br /><sub><b>qianmenfei</b></sub></a><br /><a href="https://github.com/mqttsnet/thinglinks/commits?author=qianmenfei" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/wangfan1997"><img src="https://avatars.githubusercontent.com/u/108504684?v=4" width="100px;" alt="wangfan1997"/><br /><sub><b>wangfan1997</b></sub></a><br /><a href="https://github.com/mqttsnet/thinglinks/commits?author=wangfan1997" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand Down
1 change: 1 addition & 0 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ Thanks these wonderful people, welcome to join us:
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/llJam"><img src="https://avatars.githubusercontent.com/u/113015997?v=4" width="100px;" alt="llJam"/><br /><sub><b>llJam</b></sub></a><br /><a href="https://github.com/mqttsnet/thinglinks/commits?author=llJam" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/qianmenfei"><img src="https://avatars.githubusercontent.com/u/39989430?v=4" width="100px;" alt="qianmenfei"/><br /><sub><b>qianmenfei</b></sub></a><br /><a href="https://github.com/mqttsnet/thinglinks/commits?author=qianmenfei" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/wangfan1997"><img src="https://avatars.githubusercontent.com/u/108504684?v=4" width="100px;" alt="wangfan1997"/><br /><sub><b>wangfan1997</b></sub></a><br /><a href="https://github.com/mqttsnet/thinglinks/commits?author=wangfan1997" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand Down
13 changes: 5 additions & 8 deletions doc/nacos-config/DEFAULT_GROUP/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ribbon:

# feign 配置
feign:
hystrix:
hystrix:
enabled: true
sentinel:
enabled: true
Expand All @@ -36,9 +36,9 @@ feign:

# 暴露监控端点
management:
metrics:
export:
influx:
metrics:
export:
influx:
enabled: false
endpoints:
web:
Expand All @@ -56,7 +56,4 @@ threadBus:
#缓冲队列大小
queue-capacity: 1000
#线程池名前缀
thread-name-prefix: thinglinksAsync-
#消息队列转发true kafka | false rocketmq,默认为kakfa 自行选择
mqs:
selector-kafka: true
thread-name-prefix: thinglinksAsync-
26 changes: 26 additions & 0 deletions doc/nacos-config/DEFAULT_GROUP/rocketmq.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
rocketmq:
consumer:
group: thinglinks
# ACL 开启时填写(未开启为空即可)
accessKey:
secretKey:
# 一次拉取消息最大值,注意是拉取消息的最大值而非消费最大值
pull-batch-size: 10
name-server: 127.0.0.1:19876
producer:
# 发送同一类消息的设置为同一个group,保证唯一
group: thinglinks
accessKey:
secretKey:
# 发送消息超时时间,默认3000
sendMessageTimeout: 10000
# 发送消息失败重试次数,默认2
retryTimesWhenSendFailed: 2
# 异步消息重试此处,默认2
retryTimesWhenSendAsyncFailed: 2
# 消息最大长度,默认1024 * 1024 * 4(默认4M)
maxMessageSize: 4096
# 压缩消息阈值,默认4k(1024 * 4)
compressMessageBodyThreshold: 4096
# 是否在内部发送失败时重试另一个broker,默认false
retryNextServer: false
7 changes: 2 additions & 5 deletions doc/nacos-config/DEFAULT_GROUP/thinglinks-gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ security:
- /*/v2/api-docs
- /csrf
#MQTT消息推送接口
- /broker/publish/sendMessage
#Broker WebSocket推送日志
- /broker/websocket/logging
- /broker/mqttBrokerOpen/sendMessage
#客户端身份认证接口
- /link/device/clientAuthentication
- /link/device/clientConnectionAuthentication
- /link/deviceOpenAny/clientConnectionAuthentication
- /tdengine/**
141 changes: 7 additions & 134 deletions doc/nacos-config/DEFAULT_GROUP/thinglinks-modules-broker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,137 +2,10 @@
server:
port: 19306

#smqtt配置文件V2.0
smqtt:
logLevel: INFO # 系统日志
tcp: # tcp配置
port: 11883 # mqtt端口号
notKickSecond: 30 # KICK互踢模式生效, 单位秒, 指定时间内客户端不互踢, 避免客户端自动连接持续互踢
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: # netty option设置
SO_BACKLOG: 2000
childOptions: #netty child option设置
SO_REUSEADDR: true
ssl: # ssl配置
enable: false # 开关
key: classpath:ssl/server.key # 指定ssl文件 默认系统生成
crt: classpath:ssl/server.crt # 指定ssl文件 默认系统生成
ca: classpath:ssl/server.ca # ca证书 双向加密配置
acl:
aclPolicy: JDBC # NONE or FILE or JDBC
filePath: # FILE时配置filePath
jdbcAclConfig:
driver: com.mysql.jdbc.Driver
url: ${spring.datasource.dynamic.datasource.master.url}
username: ${spring.datasource.dynamic.datasource.master.username}
password: ${spring.datasource.dynamic.datasource.master.password}
http: # http相关配置 端口固定60000
enable: true # 开关
accessLog: false # http访问日志
ssl: # ssl配置
enable: false
admin: # Broker后台管理配置
enable: true # 开关
username: thinglinks # 访问用户名
password: thinglinks # 访问密码
auth:
http: #设备鉴权模式(请求方式固定 POST body 格式为: {"clientIdentifier":"","username":"","password":""} 返回状态码 200 即可 如果检验失败返回400)
host: 127.0.0.1 #网关服务器IP
port: 19100 #网关服务端口
path: /link/device/clientAuthentication
params: {"deviceStatus":"ENABLE","protocolType":"MQTT"}
ws: # websocket配置
enable: true # 开关
port: 18999 # 端口
path: /mqtt # ws 的访问path mqtt.js请设置此选项
cluster: # 集群配置
#本地IP,多网卡时候指定
localAddress: 127.0.0.1
#集群IP集合
addresses: ["127.0.0.1"]
#集群持久化目录,默认启动目录
#workDirectory: /soft/dir
meter:
meterType: PROMETHEUS # INFLUXDB , PROMETHEUS
rules:
- ruleName: ROCKET_MQ
chain:
- ruleType: PREDICATE
script: $.event.equals("ping")
# - ruleType: ROCKET_MQ
# script: "{'event':'ping','clientId':clientId,'messageId':messageId,'time':time}"
- ruleType: KAFKA
script: "{'event':'ping','clientId':clientId,'messageId':messageId,'time':time}"
- ruleName: ROCKET_MQ
chain:
- ruleType: PREDICATE
script: $.event.equals("connect")
# - ruleType: ROCKET_MQ
# script: "{'event':'connect','clientId':clientId,'auth':auth,'clientAddress':clientAddress,'keepalive':keepalive,'nodeIp':nodeIp,'version':version,'time':time,'will':will}"
- ruleType: KAFKA
script: "{'event':'connect','clientId':clientId,'auth':auth,'clientAddress':clientAddress,'keepalive':keepalive,'nodeIp':nodeIp,'version':version,'time':time,'will':will}"
- ruleName: ROCKET_MQ
chain:
- ruleType: PREDICATE
script: $.event.equals("publish")
# - ruleType: ROCKET_MQ
# script: "{'event':'publish','topic':topic,'body':body,'qos':qos,'clientId':clientId,'messageId':messageId,'time':time}"
- ruleType: KAFKA
script: "{'event':'publish','topic':topic,'body':body,'qos':qos,'clientId':clientId,'messageId':messageId,'time':time}"
- ruleName: ROCKET_MQ
chain:
- ruleType: PREDICATE
script: $.event.equals("disconnect")
# - ruleType: ROCKET_MQ
# script: "{'event':'disconnect','clientId':clientId,'time':time}"
- ruleType: KAFKA
script: "{'event':'disconnect','clientId':clientId,'time':time}"
- ruleName: ROCKET_MQ
chain:
- ruleType: PREDICATE
script: $.event.equals("clone")
# - ruleType: ROCKET_MQ
# script: "{'event':'disconnect','clientId':clientId,'time':time}"
- ruleType: KAFKA
script: "{'event':'disconnect','clientId':clientId,'time':time}"
- ruleName: ROCKET_MQ
chain:
- ruleType: PREDICATE
script: $.event.equals("subscribe")
# - ruleType: ROCKET_MQ
# script: "{'event':'subscribe','clientId':clientId,'subscribeTopics':subscribeTopics,'time':time}"
- ruleType: KAFKA
script: "{'event':'subscribe','clientId':clientId,'subscribeTopics':subscribeTopics,'time':time}"
- ruleName: ROCKET_MQ
chain:
- ruleType: PREDICATE
script: $.event.equals("unsubscribe")
# - ruleType: ROCKET_MQ
# script: "{'event':'unsubscribe','clientId':clientId,'topics':topics,'time':time}"
- ruleType: KAFKA
script: "{'event':'unsubscribe','clientId':clientId,'topics':topics,'time':time}"
sources: # 配置数据源sources
# - source: ROCKET_MQ # rocketmq配置
# sourceName: rocket_mq
# sourceAttributes:
# topic: thinglinks-link-mqttMsg
# tags: thinglinks
# namesrvAddr: 127.0.0.1:9876
# instanceName: broker-a
# producerGroup: thinglinks-broker
- source: KAFKA # kafka配置
sourceName: kafka
sourceAttributes:
topic: thinglinks-link-mqttMsg
bootstrap-servers: 127.0.0.1:9092
key-serializer: org.apache.kafka.common.serialization.StringSerializer
value-serializer: org.apache.kafka.common.serialization.StringSerializer
thinglinks:
#feign 通用三方API服务
feign:
#bifromq 服务API
bifromq:
#api-service的HTTP端口(注意:这填写Bifromq的API端口,默认8091,请填写服务器真实IP,避免使用127.0.0.1)
bifromq-api-server: http://127.0.0.1:8091
9 changes: 1 addition & 8 deletions doc/nacos-config/DEFAULT_GROUP/thinglinks-modules-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
server:
port: 19305

# rocketmq地址
rocketmq:
name-server: 127.0.0.1:19876
# 默认的消息组
producer:
group: thinglinks-link

# mybatis配置
mybatis:
# 搜索指定包别名
Expand All @@ -20,4 +13,4 @@ mybatis:
swagger:
title: Link模块接口文档
license: Powered By thinglinks
licenseUrl: https://showdoc.thinglinks.mqttsnet.com
licenseUrl: http://www.mqttsnet.com/
8 changes: 1 addition & 7 deletions doc/nacos-config/DEFAULT_GROUP/thinglinks-modules-rule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
server:
port: 19308

# rocketmq地址
rocketmq:
name-server: 127.0.0.1:19876
# 默认的消息组
producer:
group: thinglinks-rule

# mybatis配置
mybatis:
Expand All @@ -20,4 +14,4 @@ mybatis:
swagger:
title: Link模块接口文档
license: Powered By thinglinks
licenseUrl: https://showdoc.thinglinks.mqttsnet.com
licenseUrl: http://www.mqttsnet.com/
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ spring:
mybatis:
mapper-locations: classpath:mapper/*.xml

# rocketmq地址
rocketmq:
name-server: 127.0.0.1:19876
# 默认的消息组
producer:
group: thinglinks-tdengine

# seata配置
seata:
# 默认关闭,如需启用spring.datasource.dynami.seata需要同时开启
Expand Down
4 changes: 2 additions & 2 deletions doc/sql/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# thinglinks.sql是业务表
# thinglinks_config.sql是nacos表
# changeRecord 下为数据库变更记录
# thinglinks.sql是业务表,最新的表结构
# thinglinks_seata.sql是分布式事务表
Loading

0 comments on commit d8187b0

Please sign in to comment.