|
|
|
@ -39,6 +39,8 @@ import org.thingsboard.server.queue.sqs.TbAwsSqsProducerTemplate; |
|
|
|
import org.thingsboard.server.queue.sqs.TbAwsSqsQueueAttributes; |
|
|
|
import org.thingsboard.server.queue.sqs.TbAwsSqsSettings; |
|
|
|
|
|
|
|
import javax.annotation.PreDestroy; |
|
|
|
|
|
|
|
@Component |
|
|
|
@ConditionalOnExpression("'${queue.type:null}'=='aws-sqs' && '${service.type:null}'=='monolith'") |
|
|
|
public class AwsSqsMonolithQueueFactory implements TbCoreQueueFactory, TbRuleEngineQueueFactory { |
|
|
|
@ -145,4 +147,23 @@ public class AwsSqsMonolithQueueFactory implements TbCoreQueueFactory, TbRuleEng |
|
|
|
public TbQueueRequestTemplate<TbProtoJsQueueMsg<JsInvokeProtos.RemoteJsRequest>, TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse>> createRemoteJsRequestTemplate() { |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
@PreDestroy |
|
|
|
private void destroy() { |
|
|
|
if (coreAdmin != null) { |
|
|
|
coreAdmin.destroy(); |
|
|
|
} |
|
|
|
if (ruleEngineAdmin != null) { |
|
|
|
ruleEngineAdmin.destroy(); |
|
|
|
} |
|
|
|
if (jsExecutorAdmin != null) { |
|
|
|
jsExecutorAdmin.destroy(); |
|
|
|
} |
|
|
|
if (transportApiAdmin != null) { |
|
|
|
transportApiAdmin.destroy(); |
|
|
|
} |
|
|
|
if (notificationAdmin != null) { |
|
|
|
notificationAdmin.destroy(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|