yy549159265 opened a new pull request, #3474:
URL: https://github.com/apache/hertzbeat/pull/3474
### 重构内容
1. **使用 Paho SDK (v1.2.5) 完全重构 MQTT 客户端实现**
2. **支持连接类型**
- 普通 MQTT 连接
- MQTTS 安全连接(TLS 加密)
3. **TLS 单/双向认证能力**
- 支持 TLSv1.2/TLSv1.3 协议
- 支持跳过证书验证选项
- 支持自定义 CA 证书导入
- 支持客户端证书/私钥上传
4. **完整指标采集**
- 响应时间(ms)
- 订阅/发布状态记录
- 接收数据内容追踪
### Paho 对比 HiveMQ 的优势
1. **轻量化设计**:Paho SDK 体积更小,资源占用低,适合物联网/移动设备等资源受限场景,而 HiveMQ SDK 架构复杂,集成成本更高。
2. **跨平台一致性**:Paho 对多平台/编程语言支持更完善,API 设计简洁统一;HiveMQ SDK 类库层级复杂,跨平台适配难度大。
3. **集成效率**:Paho 接口直观,文档示例清晰,新手可快速上手;HiveMQ SDK 接口设计繁琐,需投入更多学习成本。
4. **社区生态**:Paho 作为 Eclipse 项目,社区活跃且文档完善;HiveMQ 商业化导向强,开源资源相对有限。
### 测试验证截图
- [普通 MQTT
连接](https://github.com/user-attachments/assets/7fcb9589-7c0f-433f-bc8d-ddd559f70df0)
- [MQTTS
双向认证](https://github.com/user-attachments/assets/1011d78d-eb19-47f8-a768-739f2c387fa0)
- [MQTTS
单向认证(不跳过验证)](https://github.com/user-attachments/assets/935e156c-9c1e-487c-96f2-ce9d457be888)
-
[响应内容指标](https://github.com/user-attachments/assets/d4f01003-983e-42b1-855a-3e5d47407193)
- [MQTTS
单向认证(跳过验证)](https://github.com/user-attachments/assets/80967496-f0c5-4692-93da-efcbd226fe09)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]