|
|
@ -266,7 +266,7 @@ public class DefaultTelemetryWebSocketService implements TelemetryWebSocketServi |
|
|
} else if (customerSessions.size() < maxSubscriptionsPerCustomer) { |
|
|
} else if (customerSessions.size() < maxSubscriptionsPerCustomer) { |
|
|
customerSessions.add(subId); |
|
|
customerSessions.add(subId); |
|
|
} else { |
|
|
} else { |
|
|
log.info("[{}][{}][{}] Failed to start subscription. Max customer sessions limit reached" |
|
|
log.info("[{}][{}][{}] Failed to start subscription. Max customer subscriptions limit reached" |
|
|
, sessionRef.getSecurityCtx().getTenantId(), sessionRef.getSecurityCtx().getId(), subId); |
|
|
, sessionRef.getSecurityCtx().getTenantId(), sessionRef.getSecurityCtx().getId(), subId); |
|
|
msgEndpoint.close(sessionRef, CloseStatus.POLICY_VIOLATION.withReason("Max customer subscriptions limit reached")); |
|
|
msgEndpoint.close(sessionRef, CloseStatus.POLICY_VIOLATION.withReason("Max customer subscriptions limit reached")); |
|
|
return false; |
|
|
return false; |
|
|
@ -279,7 +279,7 @@ public class DefaultTelemetryWebSocketService implements TelemetryWebSocketServi |
|
|
if (regularUserSessions.size() < maxSubscriptionsPerRegularUser) { |
|
|
if (regularUserSessions.size() < maxSubscriptionsPerRegularUser) { |
|
|
regularUserSessions.add(subId); |
|
|
regularUserSessions.add(subId); |
|
|
} else { |
|
|
} else { |
|
|
log.info("[{}][{}][{}] Failed to start subscription. Max user sessions limit reached" |
|
|
log.info("[{}][{}][{}] Failed to start subscription. Max regular user subscriptions limit reached" |
|
|
, sessionRef.getSecurityCtx().getTenantId(), sessionRef.getSecurityCtx().getId(), subId); |
|
|
, sessionRef.getSecurityCtx().getTenantId(), sessionRef.getSecurityCtx().getId(), subId); |
|
|
msgEndpoint.close(sessionRef, CloseStatus.POLICY_VIOLATION.withReason("Max regular user subscriptions limit reached")); |
|
|
msgEndpoint.close(sessionRef, CloseStatus.POLICY_VIOLATION.withReason("Max regular user subscriptions limit reached")); |
|
|
return false; |
|
|
return false; |
|
|
@ -292,7 +292,7 @@ public class DefaultTelemetryWebSocketService implements TelemetryWebSocketServi |
|
|
if (publicUserSessions.size() < maxSubscriptionsPerPublicUser) { |
|
|
if (publicUserSessions.size() < maxSubscriptionsPerPublicUser) { |
|
|
publicUserSessions.add(subId); |
|
|
publicUserSessions.add(subId); |
|
|
} else { |
|
|
} else { |
|
|
log.info("[{}][{}][{}] Failed to start subscription. Max user sessions limit reached" |
|
|
log.info("[{}][{}][{}] Failed to start subscription. Max public user subscriptions limit reached" |
|
|
, sessionRef.getSecurityCtx().getTenantId(), sessionRef.getSecurityCtx().getId(), subId); |
|
|
, sessionRef.getSecurityCtx().getTenantId(), sessionRef.getSecurityCtx().getId(), subId); |
|
|
msgEndpoint.close(sessionRef, CloseStatus.POLICY_VIOLATION.withReason("Max public user subscriptions limit reached")); |
|
|
msgEndpoint.close(sessionRef, CloseStatus.POLICY_VIOLATION.withReason("Max public user subscriptions limit reached")); |
|
|
return false; |
|
|
return false; |
|
|
|