gnodet commented on PR #22205:
URL: https://github.com/apache/camel/pull/22205#issuecomment-4125325610

   _Claude Code on behalf of Guillaume Nodet_
   
   Good point @apupier — the original change in 
[CAMEL-16072](https://issues.apache.org/jira/browse/CAMEL-16072) (commit 
9085572) intentionally avoided `System.exit(0)` to allow "normal exit" when the 
exit code is 0.
   
   However, the assumption that all threads would terminate naturally after 
`CamelContext.stop()` doesn't hold for components like RabbitMQ that use 
non-daemon thread pools managed by third-party libraries. When Camel stops, 
these threads remain alive and prevent the JVM from exiting.
   
   Note that `camel-spring-main` has always called `System.exit()` 
unconditionally — so this change makes `Main` and `KameletMain` consistent with 
that behavior. The JIRA reporter also confirmed that adding `System.exit(0)` to 
the main method was the exact workaround.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to