【问题标题】:Is there any option in Camel Spring Boot application to shutdown the JVM process after processing all the message?Camel Spring Boot 应用程序中是否有任何选项可以在处理所有消息后关闭 JVM 进程?
【发布时间】:2020-03-31 21:24:28
【问题描述】:

我的要求是在处理完来自源位置的所有消息后终止 Java 进程。我正在使用以下技术- Spring-Boot - 版本 2.2.4.RELEASE 骆驼 - 版本 3.0.1 Open-JDK-版本 11.0.3.7-1

我使用了 camel.springboot.duration-max-idle-seconds=10 选项。等待 10 秒后,它调用关闭钩子并关闭 spring 和 camel 上下文。之后,java进程不会被终止。我不明白哪个实际阻塞来终止java进程?

【问题讨论】:

    标签: spring-boot apache-camel


    【解决方案1】:

    有一个关于未完全终止的错误。这已在即将发布的 Camel 3.2.0 版本中修复。

    作为一种解决方法,您可以执行自己的“检测空闲之后”,然后执行终止 - System.exit 以强制 JVM 终止等。

    【讨论】:

      猜你喜欢
      • 2020-06-14
      • 2019-02-14
      • 2020-08-02
      • 1970-01-01
      • 1970-01-01
      • 2017-07-19
      • 2021-03-08
      • 2023-03-17
      • 1970-01-01
      相关资源
      最近更新 更多