我有这个:
15:20:06 | INFO | aultShutdownStrategy | mel.impl.DefaultShutdownStrategy 73 | Starting to graceful shutdown routes (timeout 300 seconds)
15:20:06 | INFO | aultShutdownStrategy | mel.impl.DefaultShutdownStrategy 106 | Graceful shutdown of routes completed in 0 seconds
15:20:06 | WARN | ltInflightRepository | l.impl.DefaultInflightRepository 91 | Shutting down while there are still 1 in flight exchanges.
我认为优雅的关机会等待这次飞行交换降落! 为什么说“在0秒内完成路线的关闭”?
它是否与我在交换机仍在飞行途中的处理器中写的Thread.sleep(30000);
有关?
编辑:
我有这个配置到applicationContext:
<bean id="MainRouteBuilder" class="something.router2.MainRoute" init-method="init">
<property name="ruleService" >
<osgi:reference interface="something.router2.service.RuleService" />
</property>
<property name="controlInbox" value="${router.controlInbox}" />
<property name="errorBox" value="${router.errorBox}" />
<property name="rulesCamelContext" ref="secondCamelContext" />
</bean>
<!-- Camel -->
<camelContext xmlns="http://camel.apache.org/schema/spring" id="myCamelContext">
<routeBuilder ref="MainRouteBuilder"/>
</camelContext>
<camelContext xmlns="http://camel.apache.org/schema/spring" id="secondCamelContext">
</camelContext>
我尝试使用“myCamelContext”将“secondCamelContext”停止到路径中。
答案 0 :(得分:1)
如何关闭应用程序?
如果您从路线触发关机,请参阅此常见问题解答:http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html如何正确执行此操作。如果这样做错了,那么你可能会遇到上述情况,当你关机时,1个机上信息卡在注册表中。