Browse Source

解决接收(设备数据)redis数据后数据没有清除的问题(redisStream源使用错误)

develop
xiepufeng 9 months ago
parent
commit
47857c58c0
  1. 2
      zc-business/src/main/java/com/zc/business/message/device/listener/DeviceEventListener.java
  2. 2
      zc-business/src/main/java/com/zc/business/message/device/listener/DeviceFunctionReplyListener.java
  3. 2
      zc-business/src/main/java/com/zc/business/message/device/listener/DevicePropertyReadReplyListener.java
  4. 2
      zc-business/src/main/java/com/zc/business/message/device/listener/DevicePropertyReportListener.java
  5. 2
      zc-business/src/main/java/com/zc/business/message/device/listener/DevicePropertyWriteReplyListener.java
  6. 2
      zc-business/src/main/java/com/zc/business/message/device/listener/OfflineMessageListener.java
  7. 2
      zc-business/src/main/java/com/zc/business/message/device/listener/OnlineMessageListener.java

2
zc-business/src/main/java/com/zc/business/message/device/listener/DeviceEventListener.java

@ -7,6 +7,7 @@ import com.zc.common.core.redis.stream.RedisStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.connection.stream.ObjectRecord;
import org.springframework.data.redis.connection.stream.RecordId;
import org.springframework.data.redis.stream.StreamListener;
@ -24,6 +25,7 @@ public class DeviceEventListener implements StreamListener<String, ObjectRecord<
private static final Logger log = LoggerFactory.getLogger(DeviceEventListener.class);
@Autowired
@Qualifier("iotRedisStream")
private RedisStream redisStream;
@Resource

2
zc-business/src/main/java/com/zc/business/message/device/listener/DeviceFunctionReplyListener.java

@ -4,6 +4,7 @@ import com.zc.common.core.redis.stream.RedisStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.connection.stream.ObjectRecord;
import org.springframework.data.redis.connection.stream.RecordId;
import org.springframework.data.redis.stream.StreamListener;
@ -18,6 +19,7 @@ public class DeviceFunctionReplyListener implements StreamListener<String, Objec
private static final Logger log = LoggerFactory.getLogger(DeviceFunctionReplyListener.class);
@Autowired
@Qualifier("iotRedisStream")
private RedisStream redisStream;
@Override

2
zc-business/src/main/java/com/zc/business/message/device/listener/DevicePropertyReadReplyListener.java

@ -4,6 +4,7 @@ import com.zc.common.core.redis.stream.RedisStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.connection.stream.ObjectRecord;
import org.springframework.data.redis.connection.stream.RecordId;
import org.springframework.data.redis.stream.StreamListener;
@ -18,6 +19,7 @@ public class DevicePropertyReadReplyListener implements StreamListener<String, O
private static final Logger log = LoggerFactory.getLogger(DevicePropertyReadReplyListener.class);
@Autowired
@Qualifier("iotRedisStream")
private RedisStream redisStream;
@Override

2
zc-business/src/main/java/com/zc/business/message/device/listener/DevicePropertyReportListener.java

@ -14,6 +14,7 @@ import com.zc.common.core.redis.stream.RedisStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.connection.stream.ObjectRecord;
import org.springframework.data.redis.connection.stream.RecordId;
import org.springframework.data.redis.stream.StreamListener;
@ -35,6 +36,7 @@ public class DevicePropertyReportListener implements StreamListener<String, Obje
private static final Logger log = LoggerFactory.getLogger(DevicePropertyReportListener.class);
@Autowired
@Qualifier("iotRedisStream")
private RedisStream redisStream;
@Resource
private ThreadPoolTaskExecutor threadPoolTaskExecutor;

2
zc-business/src/main/java/com/zc/business/message/device/listener/DevicePropertyWriteReplyListener.java

@ -4,6 +4,7 @@ import com.zc.common.core.redis.stream.RedisStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.connection.stream.ObjectRecord;
import org.springframework.data.redis.connection.stream.RecordId;
import org.springframework.data.redis.stream.StreamListener;
@ -18,6 +19,7 @@ public class DevicePropertyWriteReplyListener implements StreamListener<String,
private static final Logger log = LoggerFactory.getLogger(DevicePropertyWriteReplyListener.class);
@Autowired
@Qualifier("iotRedisStream")
private RedisStream redisStream;
@Override

2
zc-business/src/main/java/com/zc/business/message/device/listener/OfflineMessageListener.java

@ -7,6 +7,7 @@ import com.zc.business.service.IDcDeviceService;
import com.zc.common.core.redis.stream.RedisStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.connection.stream.ObjectRecord;
import org.springframework.data.redis.connection.stream.RecordId;
import org.springframework.data.redis.stream.StreamListener;
@ -26,6 +27,7 @@ public class OfflineMessageListener implements StreamListener<String, ObjectReco
private static final Logger log = LoggerFactory.getLogger(OfflineMessageListener.class);
@Resource
@Qualifier("iotRedisStream")
private RedisStream redisStream;
@Resource

2
zc-business/src/main/java/com/zc/business/message/device/listener/OnlineMessageListener.java

@ -8,6 +8,7 @@ import com.zc.common.core.redis.stream.RedisStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.connection.stream.ObjectRecord;
import org.springframework.data.redis.connection.stream.RecordId;
import org.springframework.data.redis.stream.StreamListener;
@ -26,6 +27,7 @@ public class OnlineMessageListener implements StreamListener<String, ObjectRecor
private static final Logger log = LoggerFactory.getLogger(OnlineMessageListener.class);
@Autowired
@Qualifier("iotRedisStream")
private RedisStream redisStream;
@Resource

Loading…
Cancel
Save