activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Reock (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMQ-6231) AbortSlowConsumer Strategy Inaccurate at default Sampling Rate
Date Wed, 06 Apr 2016 18:47:25 GMT
Justin Reock created AMQ-6231:
---------------------------------

             Summary: AbortSlowConsumer Strategy Inaccurate at default Sampling Rate
                 Key: AMQ-6231
                 URL: https://issues.apache.org/jira/browse/AMQ-6231
             Project: ActiveMQ
          Issue Type: Bug
          Components: JMS client
    Affects Versions: 5.13.2
         Environment: Any
            Reporter: Justin Reock
            Priority: Minor


The default period check for the AbortSlowConsumer strategy is set to 30 seconds, however,
the check itself is rather simple.  It checks the the number of messages in the prefetch buffer,
and if that number is the same on the next check, that consumer is considered slow and is
evicted.

This can be inaccurate though, because there is no check that actually looks at whether the
messages in the prefetch buffer are the same messages as before.  In other words, if the consumer
processes all the messages in prefetch, and prefetch is refilled to the same number as the
previous check, the consumer will be considered slow.

You can reproduce this issue by starting with a queue with 5000 messages in it, and a prefetch
of 1000.  Attach a consumer, and enable the Logger Plugin with logAll=true.  Set the AbortSlowConsumer
strategy with default options.  After 30 seconds, even though the consumer has been reasonably
processing messages, the Strategy will abort the consumer anyway, and you'll see a report
from the Logger plugin that the consumer was slow.

Then, repeat the same test, but set the AbortSlowConsumer checkPeriod down to a very small
value, like 5 milliseconds.  The Consumer will never be considered slow.



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

Mime
View raw message