Hi Claus, The test cases were helpful. However, the reason I cannot use "Defer" option is because my Jetty input point is public, and if I have this option set, then the new messages will keep comming from the clients and the context will never be done. My goal is stop processesing gracefully while not acceptin new messages. E.g. Jetty entry point should not accept any new messages, while it should still let the pending messages finish. In our use case, once jetty component stops acceptin new messages, our load ballancer will take it off the pool, however, we would still like the in flight messages to finish. The issue seems only occur when I use Jetty and JMS together.
The simple route with just one jetty consumer such as the one below seems to shutdown just fine : from("jetty:http://0.0.0.0:8686/hello") .delay(5000) .to("multiplier"); If I add a jms producer to the mix as follows, things break: from("jetty:http://0.0.0.0:8686/hello") .delay(5000) .to("jms:queue:numbers2?requestTimeout=50000") .to("multiplier"); The other queue is running in a different context, but I don't think this should matter. Please, let me know if you think I'm misusing the API, or if it is an actual bug. Thanks again, Ilya.