0
votes

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".

1

1 Answers

1
votes

How do you shutdown the application?

If you trigger a shutdown from a route then see this FAQ: http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html how to do this correctly. If doing this wrong then you may have the situation above with 1 inflight message stuck in the registry when you shutdown.