ActiveMQ
  1. ActiveMQ
  2. AMQ-3733

Topic subscriber is assumed to be slow consumer when prefetch is set to one.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.1
    • Fix Version/s: 5.6.0
    • Component/s: Broker
    • Labels:
      None

      Description

      The broker checks for slow subscribers by checking its dispatch queue size against the prefetch size. If the dispatch queue is greater than or equal to the prefetch size the broker treats this subscription is a slow subscriber.

      However if the subscribers prefetch size is "1" then the subscription will get treated as a slow subscriber even if the messages do not remain long in the subscription. This can result in a lot of warning log statements

      "TopicSubscription: consumer=... has reached its prefetch limit without an ack, it appears to be slow"
      

      and slow consumer advisory messages being generated if "AdvisoryForSlowConsumers" has been turned on.

        Activity

        Hide
        Pat Fox added a comment -

        attached a patch which contains a unit test to demonstrate the issue. Patch created on version 1291465

        Show
        Pat Fox added a comment - attached a patch which contains a unit test to demonstrate the issue. Patch created on version 1291465
        Hide
        Pat Fox added a comment -

        added timeout to ensure consumer.receive() does not hang indefinitely

        Show
        Pat Fox added a comment - added timeout to ensure consumer.receive() does not hang indefinitely
        Hide
        Gary Tully added a comment -

        fix in http://svn.apache.org/viewvc?rev=1301565&view=rev

        thanks for the great test case, makes a fix so much easier

        Show
        Gary Tully added a comment - fix in http://svn.apache.org/viewvc?rev=1301565&view=rev thanks for the great test case, makes a fix so much easier

          People

          • Assignee:
            Gary Tully
            Reporter:
            Pat Fox
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development