camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: FileConsumer in a route is not stopped when the route is stopped
Date Wed, 18 Sep 2013 06:51:35 GMT
Hi

How do you stop the route?

You should use the API on CamelContext, it has a stopRoute /
remoteRoute you can use to first stop and remove.



On Tue, Sep 17, 2013 at 11:27 PM, rodgersh <hugh.rodgers@lmco.com> 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.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message