我有这个 :
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”停止到一条路线中。