Hello, all! We are running ActiveMQ + Camel (configured using Spring) as a service (using wrapper) on Windows platform (x86/x64).
We cannot achieve clean shutdown of activemq + camel service, because activemq is stopping before camel routes, which leads to many warnings and errors from routes regarding JMS connection loss, such as: and in some cases this Are there any solution to make Camel to shutdown before ActiveMQ, or maybe to make ActiveMQ to delay for some time on shutdown to allow Camel to stop routes correctly? I've already dug the subject for a long time with no success. Similar post here without solution: Errors because ActiveMQ is shutting down before CamelContext <http://activemq.2283324.n4.nabble.com/Errors-because-ActiveMQ-is-shutting-down-before-CamelContext-td4677524.html> Steps to reproduce the subject *1. Clean installation* of ActiveMQ <http://activemq.apache.org/download.html> on Windows. *2. Testing* involves: start service, wait for camel routes to be started, stop service. *3. Configuration example #1* suggested here https://github.com/apache/camel/blob/master/examples/camel-example-management/src/main/resources/META-INF/spring/camel-context.xml <https://github.com/apache/camel/blob/master/examples/camel-example-management/src/main/resources/META-INF/spring/camel-context.xml> : *activemq.xml* *wrapper.log* Activemq is shutting down before camel, which leads to warning /Setup of JMS message listener invoker failed/. I assume, the log should first inform about /Apache Camel 2.18.0 (CamelContext: camel) is shutting down/. Attached configuration: activemq-example-1.xml <http://camel.465427.n5.nabble.com/file/n5803644/activemq-example-1.xml> Attached log output: wrapper-example-1.log <http://camel.465427.n5.nabble.com/file/n5803644/wrapper-example-1.log> *4. Configuration example #2* based on default activemq.xml provided with installation. The only difference made to activemq.xml (import camel.xml, id=broker, useShutdownHook=false, add vm transport connector): *activemq.xml* *camel.xml* *wrapper.log* Same problem here. Attached configuration: activemq-example-2.xml <http://camel.465427.n5.nabble.com/file/n5803644/activemq-example-2.xml> camel-example-2.xml <http://camel.465427.n5.nabble.com/file/n5803644/camel-example-2.xml> Attached log output: wrapper-example-2.log <http://camel.465427.n5.nabble.com/file/n5803644/wrapper-example-2.log> -- View this message in context: http://camel.465427.n5.nabble.com/ActiveMQ-shuts-down-before-Camel-routes-when-stopping-service-in-Windows-tp5803644.html Sent from the Camel - Users mailing list archive at Nabble.com.