温馨提示:本文翻译自stackoverflow.com,查看原文请点击:其他 - How do you make sure that Spring Integration poller works and executes missed schedules when a servi
spring-boot spring-integration spring-integration-dsl

其他 - 您如何确保在服务时Spring Integration轮询器能够正常工作并执行错过的计划

发布于 2020-04-19 10:42:16
IntegrationFlows
        .from(() -> new GenericMessage<>(""),
                e -> e.poller(p -> p.cron("0 0/5 * 1/1 * *")))

在上述集成流程中,存在cron计划,对于该计划,将空消息推送到特定队列中。如果时间表真的很长(假设每两周一次),并且应该在时间表被执行时,服务将重新启动或关闭。我们如何确保在备份服务后立即执行它?Spring集成默认情况下会这样做吗?(我在文档中找不到任何内容)

查看更多

提问者
Vikas Shetty
被浏览
60
Gary Russell 2020-02-04 21:45

框架中没有任何内容可以处理由于应用程序在预期执行时未运行而错过的执行。

对于如此大的执行延迟,最好使用外部调度程序(anacron等)。