Commit 7766e11b authored by 赵啸非's avatar 赵啸非

分组更新设备

parent 56af34af
...@@ -74,7 +74,7 @@ public class CustomerKeyExpirationListener implements MessageListener { ...@@ -74,7 +74,7 @@ public class CustomerKeyExpirationListener implements MessageListener {
public void onMessage(Message message, byte[] bytes) { public void onMessage(Message message, byte[] bytes) {
String key = message.toString(); String key = message.toString();
//解决分布式系统 重复获取广播消息 //解决分布式系统 重复获取广播消息
boolean setnx = cacheService.setnx(key, 1, 10); boolean setnx = cacheService.setnx(key, 1, 5);
if (setnx) { if (setnx) {
String subStr = StrUtil.removePrefix(key, RedisKey.KEY_DEVICE_ONLINE_CACHE); String subStr = StrUtil.removePrefix(key, RedisKey.KEY_DEVICE_ONLINE_CACHE);
......
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