|
|
|
@ -16,7 +16,9 @@ |
|
|
|
package org.thingsboard.server.service.queue; |
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; |
|
|
|
import org.springframework.context.annotation.Lazy; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.thingsboard.server.common.data.TenantProfile; |
|
|
|
import org.thingsboard.server.common.data.exception.TenantNotFoundException; |
|
|
|
@ -30,11 +32,9 @@ import org.thingsboard.server.queue.discovery.TenantRoutingInfoService; |
|
|
|
@ConditionalOnExpression("'${service.type:null}'=='monolith' || '${service.type:null}'=='tb-core' || '${service.type:null}'=='tb-rule-engine'") |
|
|
|
public class DefaultTenantRoutingInfoService implements TenantRoutingInfoService { |
|
|
|
|
|
|
|
private final TbTenantProfileCache tenantProfileCache; |
|
|
|
|
|
|
|
public DefaultTenantRoutingInfoService(TbTenantProfileCache tenantProfileCache) { |
|
|
|
this.tenantProfileCache = tenantProfileCache; |
|
|
|
} |
|
|
|
@Lazy |
|
|
|
@Autowired |
|
|
|
private TbTenantProfileCache tenantProfileCache; |
|
|
|
|
|
|
|
@Override |
|
|
|
public TenantRoutingInfo getRoutingInfo(TenantId tenantId) { |
|
|
|
|