feat(device): 添加MQTT设备在线状态管理与Redis容错机制
- 集成Spring Integration MQTT与Eclipse Paho客户端 - 添加设备在线状态填充逻辑,支持批量查询心跳数据 - 优化Redis配置,使用Lazy初始化与通用序列化器 - 增加Redis异常处理与防重复提交Fail-Open机制 - 新增Redis设备模块常量与在线状态VO - 完善MQTT与Redis集群连接配置
This commit is contained in:
@@ -66,4 +66,12 @@ public interface RedisConstants {
|
||||
String ROLE_PERMS = "system:role:perms"; // 系统角色和权限映射
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备模块
|
||||
*/
|
||||
interface Device {
|
||||
/** 设备在线状态(示例:device:online:{sn},值为 JSON,key 过期即视为离线) */
|
||||
String ONLINE = "device:online:{}";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user