- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个独立的 springboot 应用程序,带有 Apache Camel 2.24 Camelroutes 设置。预计应用程序 24x7 运行并且永远不会宕机。通过camel REST DSL 作为 REST API 公开的服务。
**
Please help how to avoid the camel springboot application from shutting down and not shut down the java process automatically every day
**
我已经使用 nohup java -jar 命令从 Udeploy 执行了 springboot jar 来部署以避免挂起中断。
每天的特定时间,应用程序都会收到一条 HangupInterceptor 消息,用于挂起并停止主实例。这会优雅地关闭我的 Camel 路由,关闭 Spring Camel 上下文,并最终销毁 Camelhttptransport servlet。
最终,当我使用 ps -ef | 检查时,springboot 应用程序的 jvm java 进程也被 Camel 上下文强制关闭/终止,并且不再运行 grep java
日志:
[ngupInterceptor] o.a.c.m.MainSupport$HangupInterceptor : Received hang up - stopping the main instance.
[ngupInterceptor] o.a.camel.spring.SpringCamelContext : Apache Camel 2.24.0 (CamelContext: Camel1) is shutting down
[ngupInterceptor] o.a.camel.impl.DefaultShutdownStrategy : Starting to graceful shutdown 2 routes(timeout 300 seconds)
[ - ShutdownTask] o.a.camel.impl.DefaultShutdownStrategy : Route: routename1 shutdown complete, was consuming from: direct://r1
[ - ShutdownTask] o.a.camel.impl.DefaultShutdownStrategy : Route: routename2 shutdown complete, was consuming from: direct://r2
[ngupInterceptor] o.a.camel.impl.DefaultShutdownStrategy : Graceful shutdown of 2 routes completed in 0 seconds
[ Thread-7] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService ’applicationTaskExecutor’
[ngupInterceptor] o.a.camel.main.MainLifecycleStrategy : CamelContext: Camel1 has been shutdown, triggering shutdown of the JVM
[ngupInterceptor] o.a.camel.spring.SpringCamelContext : Apache Camel 2.24.0 (CamelContext: Camel1) uptime 6 hours 10 minutes
[ngupInterceptor] o.a.camel.spring.SpringCamelContext : Apache Camel 2.24.0 (CamelContext: Camel1) is shutdown in 0.052 seconds
[ Thread-7] o.a.c.c.s.CamelHttpTransportServlet : Destroyed CamelHttpTransportServlet[Servlet]
application.properties 包含此文件
camel.springboot.main-run-controller=true
pom.xml 包含此文件
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-started-web</artifactId>
</dependency>
最佳答案
HangupInterceptor
可以通过在 application.properties 中设置 camel.main.hangup-interceptor-enabled=false
来禁用。
关于java - 如何避免Springboot Camel Route每天在特定时间挂断信号而关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59901255/
这个问题已经有答案了: Can the HWND from CreateWindow/CreateDialog be GetMessage'd from another thread? (7 个回答)
作为我的应用程序的一部分,我需要阻止来电。也就是说,当我的应用程序正在运行时,我将挂断所有调用并简单地通知调用者用户正忙或类似的事情。 我想用android SDK做这个,希望能支持Android 2
我正在尝试在 Android 上使用 Asmack API 实现一个简单的 XMPP 信使。这是代码: private final String XMPP_SERVER = "jabber.o
我刚刚安装了 watir,在 exec 之后 require 'watir-webdriver' browser = Watir::Browser.new :firefox 它只是打开浏览器,但一直挂
我有一个简单的问题,我需要找到波形的峰值。现在,我在使用 scipy 库中的 find_peaks_cwt 方法之前已经完成了此操作。然而,在这种情况下,我的程序在尝试找到峰值时只是挂起。我认为这与波
我不确定我的程序在哪里/如何挂起。我非常有信心它是在发送或接收链接中......但即使在互联网上搜索一些帮助并从我的教授那里获得帮助后,我仍然迷失,至于为什么这不起作用。 #include #inc
我正在尝试通过 appcelerator studio 为 android 应用程序商店打包我的应用程序,但在处理 javascript 文件后,控制台显示此错误 2017-04-17T22:47:3
const https = require("https"); const fs = require("fs"); const options = { hostname: "en.wikipedi
我有一个使用 Twilio 运行的应用程序。这个想法是你将调用一个电话号码,twilio 会接听并为你提供菜单选项。一旦你按下一个数字,它就会提交发布数据然后挂断(这部分工作正常)答案...我在他们的
Java 解决方案不是问题: public boolean killCall(Context context) { try { // Get the boring old Te
我试图在我的服务器上运行 jenkins,但我总是收到相同的消息,然后等待,等待,什么也没有。在官方网站上他们报告了这个问题,但我想问问是否有人知道如何解决这个问题,知道吗? 最佳答案 因为对我来说采
您好,在给定大量 json 对象的情况下,我在 NodeJS 上执行 HTTP 请求时遇到问题。给定小的 json 对象数组,请求工作正常。但是,如果我尝试增加 json 数组的大小,我会收到错误:套
我真的不知道发生了什么,直到今天早上我才检查这一切是否正常。我在 IDE 中看到的唯一异常(exception)是这个 IndexNotReadyException: Please change ca
我正在制作一个 ASP.NET (C#) 应用程序,它基本上是运行 Powershell 脚本以执行日常管理任务的网关。其中一些脚本使用 ActiveDirectory RSAT 模块,我发现其中一些
我是一名优秀的程序员,十分优秀!