diff --git a/application/src/main/java/org/thingsboard/server/service/entity/tenant/DefaultTbTenantService.java b/application/src/main/java/org/thingsboard/server/service/entity/tenant/DefaultTbTenantService.java index ca5bd08354..807cf6b1b1 100644 --- a/application/src/main/java/org/thingsboard/server/service/entity/tenant/DefaultTbTenantService.java +++ b/application/src/main/java/org/thingsboard/server/service/entity/tenant/DefaultTbTenantService.java @@ -50,6 +50,7 @@ public class DefaultTbTenantService implements TbTenantService { TenantProfile oldTenantProfile = oldTenant != null ? tenantProfileService.findTenantProfileById(TenantId.SYS_TENANT_ID, oldTenant.getTenantProfileId()) : null; TenantProfile newTenantProfile = tenantProfileService.findTenantProfileById(TenantId.SYS_TENANT_ID, savedTenant.getTenantProfileId()); + //TODO: send notifications before queue update tbQueueService.updateQueuesByTenants(Collections.singletonList(savedTenant.getTenantId()), newTenantProfile, oldTenantProfile); return savedTenant; } diff --git a/common/queue/src/main/java/org/thingsboard/server/queue/discovery/HashPartitionService.java b/common/queue/src/main/java/org/thingsboard/server/queue/discovery/HashPartitionService.java index 246fac00af..c5d10d918f 100644 --- a/common/queue/src/main/java/org/thingsboard/server/queue/discovery/HashPartitionService.java +++ b/common/queue/src/main/java/org/thingsboard/server/queue/discovery/HashPartitionService.java @@ -155,6 +155,8 @@ public class HashPartitionService implements PartitionService { myPartitions.remove(queueKey); partitionTopicsMap.remove(queueKey); partitionSizesMap.remove(queueKey); + //TODO: remove after merging tb entity services + removeTenant(tenantId); } @Override @@ -172,10 +174,10 @@ public class HashPartitionService implements PartitionService { //TODO: replace if we can notify CheckPoint rule nodes about queue changes if (queueRoutingInfo == null) { - log.warn("Queue was removed but still used in CheckPoint rule node. [{}][{}]", tenantId, entityId); + log.debug("Queue was removed but still used in CheckPoint rule node. [{}][{}]", tenantId, entityId); queueKey = getMainQueueKey(serviceType, tenantId); } else if (!queueRoutingInfo.getTenantId().equals(getIsolatedOrSystemTenantId(serviceType, tenantId))) { - log.warn("Tenant profile was changed but CheckPoint rule node still uses the queue from system level. [{}][{}]", tenantId, entityId); + log.debug("Tenant profile was changed but CheckPoint rule node still uses the queue from system level. [{}][{}]", tenantId, entityId); queueKey = getMainQueueKey(serviceType, tenantId); } else { queueKey = new QueueKey(serviceType, queueRoutingInfo);