引入第三方平台任务线程池

This commit is contained in:
Guoqs
2025-07-22 16:48:54 +08:00
parent 57487e5892
commit 7b71191daa
8 changed files with 103 additions and 28 deletions

View File

@@ -73,6 +73,9 @@ public class PileRabbitListener {
// 引入线程池
private ThreadPoolTaskExecutor executor = SpringUtils.getBean("threadPoolTaskExecutor");
// 引入第三方平台任务线程池
private ThreadPoolTaskExecutor thirdpartyTaskExecutor = SpringUtils.getBean("thirdpartyTaskExecutor");
// ========================= 消费消息 ========================== //
// @RabbitListener(queues = "ykc.pileLogin-topic.device-group")
// public void testRabbitMQMessage(String msg) {
@@ -378,7 +381,7 @@ public class PileRabbitListener {
} catch (Exception e) {
log.error("统一推送第三方平台实时数据 error,", e);
}
}, executor);
}, thirdpartyTaskExecutor);
// 异步推送第三方平台实时数据V2
CompletableFuture.runAsync(() -> {
@@ -387,7 +390,7 @@ public class PileRabbitListener {
} catch (Exception e) {
log.error("统一推送第三方平台实时数据V2 error, ", e);
}
}, executor);
}, thirdpartyTaskExecutor);
if (StringUtils.equals(connectorStatus, Constants.ONE)) {
// 故障
@@ -398,7 +401,7 @@ public class PileRabbitListener {
} catch (Exception e) {
log.error("统一推送第三方平台告警信息 error, ", e);
}
}, executor);
}, thirdpartyTaskExecutor);
}
}