feat:【IoT 物联网】更新设备消息处理逻辑,重构 MQTT 下行消息处理器,优化主题构建和消息发布流程

This commit is contained in:
haohao
2025-06-13 11:51:05 +08:00
parent b06556da2d
commit 569eef4a74
13 changed files with 344 additions and 749 deletions

View File

@@ -23,15 +23,13 @@ public enum IotDeviceMessageMethodEnum implements ArrayValuable<String> {
STATE_OFFLINE("thing.state.offline", true),
// ========== 设备属性 ==========
// 可参考 https://help.aliyun.com/zh/iot/user-guide/device-properties-events-and-services
// TODO @haohao使用 report 哈;
// 可参考
// https://help.aliyun.com/zh/iot/user-guide/device-properties-events-and-services
PROPERTY_POST("thing.property.post", true),
PROPERTY_REPORT("thing.property.report", true),
PROPERTY_SET("thing.property.set", false),
PROPERTY_GET("thing.property.get", false),
//
// ========== 设备事件 ==========
EVENT_POST("thing.event.post", true),
;

View File

@@ -25,9 +25,9 @@ public class IotDeviceMessage {
public static final String MESSAGE_BUS_DEVICE_MESSAGE_TOPIC = "iot_device_message";
/**
* 【消息总线】设备消息 Topic由 iot-biz 发送给 iot-gateway 的某个 server(protocol) 进行消费
* 【消息总线】设备消息 Topic由 iot-biz 发送给 iot-gateway 的某个 "server"(protocol) 进行消费
*
* 其中,%s 就是该server(protocol) 的标识
* 其中,%s 就是该"server"(protocol) 的标识
*/
public static final String MESSAGE_BUS_GATEWAY_DEVICE_MESSAGE_TOPIC = MESSAGE_BUS_DEVICE_MESSAGE_TOPIC + "_%s";
@@ -92,7 +92,7 @@ public class IotDeviceMessage {
*/
private String msg;
// ========== 基础方法:只传递codec编解码字段 ==========
// ========== 基础方法:只传递"codec编解码字段" ==========
public static IotDeviceMessage requestOf(String method) {
return requestOf(null, method, null);