Thanks. I edit the source.
SpringCamelContext context = (SpringCamelContext) applicationContext.getBean(contextId); context.start(); ProducerTemplate template = context.createProducerTemplate(); template.sendBody(endPoint, message); context.stop(); "context.stop()" works the way I want it to. There is something I have been curious about. What's the difference between context.stop() and template.stop()? -- View this message in context: http://camel.465427.n5.nabble.com/How-do-I-close-Netty-connections-and-shutdown-my-application-gracefully-tp5735496p5735504.html Sent from the Camel - Users mailing list archive at Nabble.com.