You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (JIRA)" <ji...@apache.org> on 2017/03/08 13:37:38 UTC

[jira] [Commented] (ARTEMIS-1001) slow-consumer-check-period is in minutes but behaves like with seconds

    [ https://issues.apache.org/jira/browse/ARTEMIS-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15901252#comment-15901252 ] 

Justin Bertram commented on ARTEMIS-1001:
-----------------------------------------

Couple of things...

* [~martyntaylor] didn't originally set {{DEFAULT_SLOW_CONSUMER_CHECK_PERIOD = 5}}.  [I did|https://github.com/hornetq/hornetq/commit/89200b299d2b7e4eede9c450245242f1fa92f796].
* If there was a real-world problem I think we'd hear about it on the user list or in JIRA about consumers being spuriously disconnected.  I haven't seen reports of that.
* While the default value for {{slow-consumer-check-period}} is {{5}}, the default value for {{slow-consumer-threshold}} is {{-1}} which means slow-consumer detection is off by default.
* Having done the original implementation, I disagree that the {{slow-consumer-check-period}} was supposed to have been in minutes.  If you look at the tests they all expect the check to happen in seconds rather than minutes.

> slow-consumer-check-period is in minutes but behaves like with seconds
> ----------------------------------------------------------------------
>
>                 Key: ARTEMIS-1001
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1001
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 1.5.3
>            Reporter: Miroslav Novak
>
> Attribute {{slow-consumer-check-period}} is in minutes but {{SlowConsumerReaperRunnable} thread is scheduled as it's configured with seconds.
> Problem is in {{QueueImpl.scheduleSlowConsumerReaper}} method:
> {code}
> slowConsumerReaperFuture = scheduledExecutor.scheduleWithFixedDelay(slowConsumerReaperRunnable, settings.getSlowConsumerCheckPeriod(), settings.getSlowConsumerCheckPeriod(), TimeUnit.SECONDS);
> {code}
> contains {{TimeUnit.SECONDS}} instead of {{TimeUnit.MINUTES}}. 
> I tried to debug it and can see that {{settings.getSlowConsumerCheckPeriod()}} returns 1 which is in minutes. This seems to be easy fix.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)