I have this :
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.
I thought the graceful shutdown would wait for this in flight exchange to land! Why does it say "shutdown of routes completed in 0 seconds"?
Could it be related to the Thread.sleep(30000);
I wrote in a processor in the route where the exchange is still inflight?
EDIT :
I have this config into 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>
I try to stop "secondCamelContext" into a route using "myCamelContext".