activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-921) Consumers killed as slow even if overall consuming rate is above threshold
Date Mon, 16 Jan 2017 13:50:26 GMT

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

ASF GitHub Bot commented on ARTEMIS-921:
----------------------------------------

Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/960#discussion_r96232634
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
---
    @@ -3128,6 +3128,9 @@ private SlowConsumerReaperRunnable(long checkPeriod, float threshold,
SlowConsum
     
           @Override
           public void run() {
    +         if (getConsumerCount() == 0) {
    --- End diff --
    
    Can you remove this? this is a useless statement here.
    you will be counting the number of elements on consumerSet once, for than later perform
a for (Consumer consumer : getConsumerSet()) that will perform the very same operation. It
is duplicating effort for no improvement IMO.
    
    
    If you are having a race condition shown by a test, then it's a different issue that we
must investigate, this would only hide the real issue if that was the case.


> Consumers killed as slow even if overall consuming rate is above threshold
> --------------------------------------------------------------------------
>
>                 Key: ARTEMIS-921
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-921
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 1.5.1
>            Reporter: Howard Gao
>            Assignee: Howard Gao
>             Fix For: 1.5.next
>
>
> We have one queue. Imagine messages are produced at 2 msgs/s. There are three consumers
and slow consumer limit is 1 msgs/s. What happens is that all three consumers get killed as
slow, even though it is impossible for any of them to be fast, since messages are distributed
equally between the consumers (round-robin).
> This has real consumer impact in a situation when producer rate is usually high (so it
requires multiple consumers working in parallel), but may occasionally drop close to consumer-threshold.
In this case, broker disconnects all consumers who then have to reconnect and message processing
is delayed for the time of the reconnecting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message