Commit 4a9e8a31 authored by 赵啸非's avatar 赵啸非

修正redis 最大连接数

parent d285c2c7
...@@ -49,8 +49,8 @@ public class DeviceComsumersRegisterService implements IApplicationStartedServic ...@@ -49,8 +49,8 @@ public class DeviceComsumersRegisterService implements IApplicationStartedServic
deviceService.find(new DeviceEntity()) deviceService.find(new DeviceEntity())
.stream() .stream()
.filter(f -> !ObjectUtils.isEmpty(platformService.getCache(f.getPlatformId()==null?"0":f.getPlatformId().toString()))) .filter(f -> !ObjectUtils.isEmpty(platformService.getCache(f.getPlatformId() == null ? "0" : f.getPlatformId().toString())))
.filter(f -> !ObjectUtils.isEmpty(productService.getCache(f.getProductId()==null?"0":f.getProductId().toString()))).forEach(item -> { .filter(f -> !ObjectUtils.isEmpty(productService.getCache(f.getProductId() == null ? "0" : f.getProductId().toString()))).forEach(item -> {
String uploadQueue = Constant.UPLOAD_TOPIC + item.getDeviceCode(); String uploadQueue = Constant.UPLOAD_TOPIC + item.getDeviceCode();
String downQueue = Constant.DOWN_TOPIC + item.getDeviceCode(); String downQueue = Constant.DOWN_TOPIC + item.getDeviceCode();
messageProducer.queueAddAndBinds(QueueKey.DEFAULT_EXCHANGE, uploadQueue, uploadQueue); messageProducer.queueAddAndBinds(QueueKey.DEFAULT_EXCHANGE, uploadQueue, uploadQueue);
...@@ -59,9 +59,9 @@ public class DeviceComsumersRegisterService implements IApplicationStartedServic ...@@ -59,9 +59,9 @@ public class DeviceComsumersRegisterService implements IApplicationStartedServic
String[] queues = deviceService.find(new DeviceEntity()) String[] queues = deviceService.find(new DeviceEntity())
.stream() .stream()
.filter(f -> !ObjectUtils.isEmpty(platformService.getCache(f.getPlatformId().toString()))) .filter(f -> !ObjectUtils.isEmpty(platformService.getCache(f.getPlatformId() == null ? "-1" : f.getPlatformId().toString())))
.filter(f -> !ObjectUtils.isEmpty(productService.getCache(f.getProductId().toString()))) .filter(f -> !ObjectUtils.isEmpty(productService.getCache(f.getProductId() == null ? "-1" : f.getProductId().toString())))
.filter(f->!ObjectUtils.isEmpty(f.getDeviceCode())) .filter(f -> !ObjectUtils.isEmpty(f.getDeviceCode()))
.map(item -> Constant.UPLOAD_TOPIC + item.getDeviceCode()) .map(item -> Constant.UPLOAD_TOPIC + item.getDeviceCode())
.toArray(String[]::new); .toArray(String[]::new);
......
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