You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by vishal1981 <vi...@ericsson.com> on 2013/04/03 22:21:31 UTC

Way to determine if Route is running or not

Hi,
Is there a way to query the CamelContext to find out if a route is running
or not, as in, if a route is currently processing an exchange or a consumer
endpoint of the route such as FTP or File is in the process of retrieving a
file.
I modify the routes with certain settings from the UI. Hence I need to know
if a route is running or not before I tear it down and recreate it with new
settings.
thanks in advance,
-v-



--
View this message in context: http://camel.465427.n5.nabble.com/Way-to-determine-if-Route-is-running-or-not-tp5730299.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Way to determine if Route is running or not

Posted by vishal1981 <vi...@ericsson.com>.
It works. Thanks that's exactly what I needed.
BTW - Claus you have always been very supportive. Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/Way-to-determine-if-Route-is-running-or-not-tp5730299p5730363.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Way to determine if Route is running or not

Posted by vishal1981 <vi...@ericsson.com>.
thanks! I will explore that.



--
View this message in context: http://camel.465427.n5.nabble.com/Way-to-determine-if-Route-is-running-or-not-tp5730299p5730335.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Way to determine if Route is running or not

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yes there is an org.apache.camel.spi.InflightRepository which you can
get from CamelContext. There is a size method to return if there is
any inflight messages for the given route id.

Also form JMX you can see these numbers on the route mbeans.



On Wed, Apr 3, 2013 at 10:21 PM, vishal1981
<vi...@ericsson.com> wrote:
> Hi,
> Is there a way to query the CamelContext to find out if a route is running
> or not, as in, if a route is currently processing an exchange or a consumer
> endpoint of the route such as FTP or File is in the process of retrieving a
> file.
> I modify the routes with certain settings from the UI. Hence I need to know
> if a route is running or not before I tear it down and recreate it with new
> settings.
> thanks in advance,
> -v-
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Way-to-determine-if-Route-is-running-or-not-tp5730299.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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