Just to confirm - are you referring to the default shutdown strategy in Camel which prints stuff like "Waiting as there are n in flight exchanges ..." ? There was a JIRA posted recently which would allow for the wait time to be configurable - I think the default is like five minutes or something.
In a way yes. Due to the long running process in a component this messag appears and since the process is very long running always ticks down to 0.
For now I have solved the issue with an @ApplicationScoped component that holds 1 AtomicBoolean "shutdown" that is set to true in a @PreDestroy method and in several places of the app other components check if they are supposed to cancel whatever long running action they execute.
While I do get a few errors due to already removed components and failed injection it seems to work ok in general.
It would be ideal if there would be a @PreComponentShutdown annotation that would get called on all components before the system actually starts to tear down the deployment. Once all annotated methods have been executed then tear everything down. Would give the chance to handle the shutdown process more smoothly. But maybe there is already some way to do this that I just don't see?