Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-3594

Stuck messages in topic after restart of ActiveMQ

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 5.5.0
    • Fix Version/s: 5.7.0
    • Component/s: Broker
    • Labels:
      None
    • Environment:

      Windows

      Description

      If a topic contains message and ActiveMQ is restarted, then the number of message equal to the maxPageSize will be stuck in the topic. A subscriber will only received n - maxPagSize messages. The messages will be stuck until a new message is published to the topic. Queues seems to work fine with this same scenario.

      This problem only occurs for topics that were created at startup of ActiveMQ. This issue does not occur for topics created dynamically. This problem does not exist in ActiveMQ 5.3.1.

      Here are the steps to repeating the problem:
      1. Subscriber registers with topic
      2. Bring subscriber offline
      3. Publish n messages to topic
      4. Restart ActiveMQ
      5. Bring subscriber online

      This issue occurs with out of the box ActiveMQ 5.5.0 and 5.5.1. The only changes I made were to maxPageSize and adding the destination to the activemq.xml.

      I attached a unit that can be used to reproduce the problem.

      The unit test is using the DefaultMessageListenerContainer for the subscriber. If the default cache level for the DMLC of CACHE_CONSUMER is not used this problem does not occur.

        Attachments

        1. StuckMessagesTest.java
          3 kB
          Daniel Blyth

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              daniel.blyth Daniel Blyth
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: