Commit d02d954a authored by 赵啸非's avatar 赵啸非

修改redis 过期事件通知

parent 9bf0a7d2
...@@ -248,7 +248,6 @@ public class DeviceApiController { ...@@ -248,7 +248,6 @@ public class DeviceApiController {
* @return * @return
*/ */
@PostMapping("upload") @PostMapping("upload")
//@DeviceAuth
public String upload(@RequestBody UploadDeviceReq req) { public String upload(@RequestBody UploadDeviceReq req) {
log.info("【设备数据上报】【请求体】--> " + JSONObject.toJSONString(req)); log.info("【设备数据上报】【请求体】--> " + JSONObject.toJSONString(req));
ApiResp<String> rsp = new ApiResp<>(); ApiResp<String> rsp = new ApiResp<>();
...@@ -271,7 +270,7 @@ public class DeviceApiController { ...@@ -271,7 +270,7 @@ public class DeviceApiController {
} }
String exchangeName = platformEntity.getPlatformSn() + Constant.EXCHANGE_SPLIT + productEntity.getProductCode(); String exchangeName = platformEntity.getPlatformSn() + Constant.EXCHANGE_SPLIT + productEntity.getProductCode();
TopicPartitionInfo info = TopicPartitionInfo.builder().exchangeName(exchangeName).topic(Constant.UPLOAD_TOPIC + deviceEntity.getDeviceMac()).build(); TopicPartitionInfo info = TopicPartitionInfo.builder().exchangeName(exchangeName).topic(Constant.UPLOAD_TOPIC + deviceEntity.getDeviceCode()).build();
TbQueueMsgHeaders header = new DefaultTbQueueMsgHeaders(); TbQueueMsgHeaders header = new DefaultTbQueueMsgHeaders();
header.put(MessageHeader.MESSAGETYPE, Constant.MESSAGETYPE_HEARTBEAT); header.put(MessageHeader.MESSAGETYPE, Constant.MESSAGETYPE_HEARTBEAT);
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
......
...@@ -163,7 +163,7 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi ...@@ -163,7 +163,7 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi
if (Objects.nonNull(messages)) { if (Objects.nonNull(messages)) {
try { try {
for (TbQueueMsg queueMsg : messages) { for (TbQueueMsg queueMsg : messages) {
log.debug("[WRITE MESSAGE] ->message:{}", JSON.toJSONString(queueMsg)); log.info("[WRITE MESSAGE] ->message:{}", JSON.toJSONString(queueMsg));
//做相应业务,做日志操作 //做相应业务,做日志操作
DeviceReq deviceReq = JSON.parseObject(new String(queueMsg.getData()), DeviceReq.class); DeviceReq deviceReq = JSON.parseObject(new String(queueMsg.getData()), DeviceReq.class);
boolean bool = false; boolean bool = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment