Commit bffd1368cf2e664387d370cf807e920e93ca1ec9

Authored by Igor Kulikov
2 parents a17c5b77 82bc7203

Merge branch 'master' of github.com:thingsboard/thingsboard

@@ -283,10 +283,12 @@ public class DefaultTbClusterService implements TbClusterService { @@ -283,10 +283,12 @@ public class DefaultTbClusterService implements TbClusterService {
283 byte[] msgBytes = encodingService.encode(msg); 283 byte[] msgBytes = encodingService.encode(msg);
284 TbQueueProducer<TbProtoQueueMsg<ToRuleEngineNotificationMsg>> toRuleEngineProducer = producerProvider.getRuleEngineNotificationsMsgProducer(); 284 TbQueueProducer<TbProtoQueueMsg<ToRuleEngineNotificationMsg>> toRuleEngineProducer = producerProvider.getRuleEngineNotificationsMsgProducer();
285 Set<String> tbRuleEngineServices = new HashSet<>(partitionService.getAllServiceIds(ServiceType.TB_RULE_ENGINE)); 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 TbQueueProducer<TbProtoQueueMsg<ToCoreNotificationMsg>> toCoreNfProducer = producerProvider.getTbCoreNotificationsMsgProducer(); 292 TbQueueProducer<TbProtoQueueMsg<ToCoreNotificationMsg>> toCoreNfProducer = producerProvider.getTbCoreNotificationsMsgProducer();
291 Set<String> tbCoreServices = partitionService.getAllServiceIds(ServiceType.TB_CORE); 293 Set<String> tbCoreServices = partitionService.getAllServiceIds(ServiceType.TB_CORE);
292 for (String serviceId : tbCoreServices) { 294 for (String serviceId : tbCoreServices) {