Which version of Camel were you using? How did stop the route? If you stop the route, the FileConsumer should be stopped at the same time.
-- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Wednesday, September 18, 2013 at 5:27 AM, rodgersh wrote: > Hello - > > I create a camel route dynamically at runtime that is like: > > from("file://inbox?delete=true&moveFailed=.errors").to("content://framework") > > The route works fine. If I drop a file in the /inbox directory it is > processed by the route. > > Then when I delete the OSGi managed service factory that contains the route, > my destroy() method is invoked and I stop the route, then remove the route. > From the camel logging, I see that the route was indeed stopped, shutdown, > and removed. But if I drop a file in the /inbox directory it is still > processed. I look in jconsole and see that the route has been removed, but > the route's FileConsumer still exists and is still in the "Started" state. > If I stop the FileConsumer (using the stop() button under Operations in > jconsole) the FileConsumer's state goes to "Stopped" and now if I drop the > file into /inbox it is not processed (as desired). > > What am I doing wrong in stopping/removing this route programmatically? > > Thanks for any help or ideas. > > Hugh > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/FileConsumer-in-a-route-is-not-stopped-when-the-route-is-stopped-tp5739690.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).