reactor:【IoT 物联网】阅读 thingsboard 后,增加 IotDeviceMessage 优化的 TODO

This commit is contained in:
YunaiV
2025-06-07 18:03:40 +08:00
parent a0a26c3d64
commit 40a9242691
3 changed files with 11 additions and 77 deletions

View File

@@ -41,6 +41,7 @@ public class RocketMQIotMessageBus implements IotMessageBus {
@Override
public void post(String topic, Object message) {
// TODO @芋艿:需要 orderly
SendResult result = rocketMQTemplate.syncSend(topic, JsonUtils.toJsonString(message));
log.info("[post][topic({}) 发送消息({}) result({})]", topic, message, result);
}

View File

@@ -32,11 +32,13 @@ public class IotDeviceMessage {
*/
public static final String MESSAGE_BUS_GATEWAY_DEVICE_MESSAGE_TOPIC = MESSAGE_BUS_DEVICE_MESSAGE_TOPIC + "_%s";
// TODO @芋艿thingsboard 对应 id全部由后端生成由于追溯是不是调整下
/**
* 消息编号
*/
private String messageId;
// TODO @芋艿thingsboard 是使用 deviceId
/**
* 设备信息
*/
@@ -46,6 +48,7 @@ public class IotDeviceMessage {
*/
private String deviceName;
// TODO @芋艿thingsboard 只定义了 type相当于 type + identifier 结合TbMsgType
/**
* 消息类型
*
@@ -59,6 +62,8 @@ public class IotDeviceMessage {
*/
private String identifier;
// TODO @芋艿thingsboard 只有 data 字段,没有 code 字段;
// TODO @芋艿:要不提前序列化成字符串???类似 thingsboard 的 data 字段
/**
* 请求参数
*