Do not send empty alarm updated messages during creation of TS subscriptions
This commit is contained in:
parent
aee4163a04
commit
1f44d538ee
@ -177,7 +177,9 @@ public class TbAlarmDataSubCtx extends TbAbstractDataSubCtx<AlarmDataQuery> {
|
||||
alarm.getLatest().computeIfAbsent(keyType, tmp -> new HashMap<>()).putAll(latestUpdate);
|
||||
return alarm;
|
||||
}).collect(Collectors.toList());
|
||||
wsService.sendWsMsg(sessionId, new AlarmDataUpdate(cmdId, null, update, maxEntitiesPerAlarmSubscription, data.getTotalElements()));
|
||||
if (!update.isEmpty()) {
|
||||
wsService.sendWsMsg(sessionId, new AlarmDataUpdate(cmdId, null, update, maxEntitiesPerAlarmSubscription, data.getTotalElements()));
|
||||
}
|
||||
} else {
|
||||
log.trace("[{}][{}][{}][{}] Received stale subscription update: {}", sessionId, cmdId, subscriptionUpdate.getSubscriptionId(), keyType, subscriptionUpdate);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user