Use msg queue instead of default (#4116)
* Remove device from cache in case null value cached in the distributed redis * Handle case when device was removed from db but message in the queue exists * Code review chagnes * Added usage statistics configuration to yml file * Use msg queue instead of default * Make private * Make private
This commit is contained in:
		
							parent
							
								
									3cc9ad5007
								
							
						
					
					
						commit
						c8d8321f74
					
				@ -763,8 +763,8 @@ public class DefaultTransportService implements TransportService {
 | 
			
		||||
                wrappedCallback);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected void sendToRuleEngine(TenantId tenantId, TbMsg tbMsg, TbQueueCallback callback) {
 | 
			
		||||
        TopicPartitionInfo tpi = partitionService.resolve(ServiceType.TB_RULE_ENGINE, tenantId, tbMsg.getOriginator());
 | 
			
		||||
    private void sendToRuleEngine(TenantId tenantId, TbMsg tbMsg, TbQueueCallback callback) {
 | 
			
		||||
        TopicPartitionInfo tpi = partitionService.resolve(ServiceType.TB_RULE_ENGINE, tbMsg.getQueueName(), tenantId, tbMsg.getOriginator());
 | 
			
		||||
        if (log.isTraceEnabled()) {
 | 
			
		||||
            log.trace("[{}][{}] Pushing to topic {} message {}", tenantId, tbMsg.getOriginator(), tpi.getFullTopicName(), tbMsg);
 | 
			
		||||
        }
 | 
			
		||||
@ -776,7 +776,7 @@ public class DefaultTransportService implements TransportService {
 | 
			
		||||
        ruleEngineMsgProducer.send(tpi, new TbProtoQueueMsg<>(tbMsg.getId(), msg), wrappedCallback);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected void sendToRuleEngine(TenantId tenantId, DeviceId deviceId, TransportProtos.SessionInfoProto sessionInfo, JsonObject json,
 | 
			
		||||
    private void sendToRuleEngine(TenantId tenantId, DeviceId deviceId, TransportProtos.SessionInfoProto sessionInfo, JsonObject json,
 | 
			
		||||
                                    TbMsgMetaData metaData, SessionMsgType sessionMsgType, TbQueueCallback callback) {
 | 
			
		||||
        DeviceProfileId deviceProfileId = new DeviceProfileId(new UUID(sessionInfo.getDeviceProfileIdMSB(), sessionInfo.getDeviceProfileIdLSB()));
 | 
			
		||||
        DeviceProfile deviceProfile = deviceProfileCache.get(deviceProfileId);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user