Commit bffd1368cf2e664387d370cf807e920e93ca1ec9
Merge branch 'master' of github.com:thingsboard/thingsboard
Showing
1 changed file
with
6 additions
and
4 deletions
... | ... | @@ -283,10 +283,12 @@ public class DefaultTbClusterService implements TbClusterService { |
283 | 283 | byte[] msgBytes = encodingService.encode(msg); |
284 | 284 | TbQueueProducer<TbProtoQueueMsg<ToRuleEngineNotificationMsg>> toRuleEngineProducer = producerProvider.getRuleEngineNotificationsMsgProducer(); |
285 | 285 | Set<String> tbRuleEngineServices = new HashSet<>(partitionService.getAllServiceIds(ServiceType.TB_RULE_ENGINE)); |
286 | - if (msg.getEntityId().getEntityType().equals(EntityType.TENANT) | |
287 | - || msg.getEntityId().getEntityType().equals(EntityType.TENANT_PROFILE) | |
288 | - || msg.getEntityId().getEntityType().equals(EntityType.DEVICE_PROFILE) | |
289 | - || msg.getEntityId().getEntityType().equals(EntityType.API_USAGE_STATE)) { | |
286 | + EntityType entityType = msg.getEntityId().getEntityType(); | |
287 | + if (entityType.equals(EntityType.TENANT) | |
288 | + || entityType.equals(EntityType.TENANT_PROFILE) | |
289 | + || entityType.equals(EntityType.DEVICE_PROFILE) | |
290 | + || entityType.equals(EntityType.API_USAGE_STATE) | |
291 | + || (entityType.equals(EntityType.DEVICE) && msg.getEvent() == ComponentLifecycleEvent.UPDATED)) { | |
290 | 292 | TbQueueProducer<TbProtoQueueMsg<ToCoreNotificationMsg>> toCoreNfProducer = producerProvider.getTbCoreNotificationsMsgProducer(); |
291 | 293 | Set<String> tbCoreServices = partitionService.getAllServiceIds(ServiceType.TB_CORE); |
292 | 294 | for (String serviceId : tbCoreServices) { | ... | ... |