Browse Source

全景看看

lyhzzz 5 tháng trước cách đây
mục cha
commit
d0e1b049fe

+ 2 - 1
src/main/java/com/fdkankan/mqcontroller/task/TaskService.java

@@ -322,8 +322,9 @@ public class TaskService {
                 if(mqMsg == null){
                 if(mqMsg == null){
                     continue;
                     continue;
                 }
                 }
+                log.info("mq消息信息:{},{}",mqEcs.getQueueName(),mqMsg);
                 Integer notModelingCount = mqMsg.getConsumers() - mqMsg.getMessages_unacknowledged() - mqMsg.getMessages_ready();
                 Integer notModelingCount = mqMsg.getConsumers() - mqMsg.getMessages_unacknowledged() - mqMsg.getMessages_ready();
-                if(mqSize - (notModelingCount + mqQueueConfig.getScalingThreshold()) >0 ){
+                if(mqSize >0 && mqSize - (notModelingCount + mqQueueConfig.getScalingThreshold()) >0 ){
                     log.info("待计算数量:{}大于空闲服务数量:{},阈值{},不关闭",mqSize,notModelingCount,mqQueueConfig.getScalingThreshold());
                     log.info("待计算数量:{}大于空闲服务数量:{},阈值{},不关闭",mqSize,notModelingCount,mqQueueConfig.getScalingThreshold());
                     continue;
                     continue;
                 }
                 }