You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by mattg <ma...@fronde.com> on 2012/07/09 08:02:32 UTC

Suspending/resuming routes via a policy not reflected in JMX

I've created a RoutePolicy which extends RoutePolicySupport for throttling
some routes. I've noticed that when routes are suspended or resumed by
RoutePolicySupport.startConsumer and RoutePolicySupport.stopConsumer the
status is incorrect when I look it up using JMX. I.e. if I call
RoutePolicySupport.stopConsumer and then check the status via JMX it's still
at 'Started' (and not suspended).

Is this a known bug or can I raise a Jira for it?

--
View this message in context: http://camel.465427.n5.nabble.com/Suspending-resuming-routes-via-a-policy-not-reflected-in-JMX-tp5715701.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Suspending/resuming routes via a policy not reflected in JMX

Posted by mattg <ma...@fronde.com>.
I've created  https://issues.apache.org/jira/browse/CAMEL-5435 CAMEL-5435 
for the issue.

--
View this message in context: http://camel.465427.n5.nabble.com/Suspending-resuming-routes-via-a-policy-not-reflected-in-JMX-tp5715701p5715823.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Suspending/resuming routes via a policy not reflected in JMX

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Jul 9, 2012 at 11:27 PM, mattg <ma...@fronde.com> wrote:
> We're using Camel 2.9.2.
> I'm using the 'state' attribute and the 'getState()' operation on the route
> list under routes for the org.apache.camel mbean via JConsole.
>
> If I'm using JMX via Java I can query for all routes using '.. = new
> ObjectName("org.apache.camel:type=routes,*")' and then check the state
> attribute.
>
> If I suspend the route using jconsole and the suspend() operation the state
> immediately changes to 'suspended'.
> However if the route is suspended via RoutePolicySupport.stopConsumer the
> state is isn't updated to 'suspended' and stays at 'started'.
>

Yeah that sounds like an issue, could you log a JIRA.
An unit test reproducing the issue is much appreciated.


> --
> View this message in context: http://camel.465427.n5.nabble.com/Suspending-resuming-routes-via-a-policy-not-reflected-in-JMX-tp5715701p5715785.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Suspending/resuming routes via a policy not reflected in JMX

Posted by mattg <ma...@fronde.com>.
We're using Camel 2.9.2. 
I'm using the 'state' attribute and the 'getState()' operation on the route
list under routes for the org.apache.camel mbean via JConsole.

If I'm using JMX via Java I can query for all routes using '.. = new
ObjectName("org.apache.camel:type=routes,*")' and then check the state
attribute.

If I suspend the route using jconsole and the suspend() operation the state
immediately changes to 'suspended'.
However if the route is suspended via RoutePolicySupport.stopConsumer the
state is isn't updated to 'suspended' and stays at 'started'.

--
View this message in context: http://camel.465427.n5.nabble.com/Suspending-resuming-routes-via-a-policy-not-reflected-in-JMX-tp5715701p5715785.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Suspending/resuming routes via a policy not reflected in JMX

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Jul 9, 2012 at 8:02 AM, mattg <ma...@fronde.com> wrote:
> I've created a RoutePolicy which extends RoutePolicySupport for throttling
> some routes. I've noticed that when routes are suspended or resumed by
> RoutePolicySupport.startConsumer and RoutePolicySupport.stopConsumer the
> status is incorrect when I look it up using JMX. I.e. if I call
> RoutePolicySupport.stopConsumer and then check the status via JMX it's still
> at 'Started' (and not suspended).
>
> Is this a known bug or can I raise a Jira for it?
>

Which stats do you look in JMX, eg whats the ObjectName you look at?

And what Camel version do you use?


> --
> View this message in context: http://camel.465427.n5.nabble.com/Suspending-resuming-routes-via-a-policy-not-reflected-in-JMX-tp5715701.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen