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

Durable subscriber only receives part of the persisted messages on re-connect

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.6.0
    • Fix Version/s: 5.7.0
    • Component/s: Connector
    • Labels:
      None
    • Environment:

      Default configuraton of ActiveMQ under Linux or Windows

      Description

      A durable subscriber is connected to ActiveMQ using the ConnectionConsumer protocol, transacted sessions, and at most 1 message per session. While the subscriber is disconnected, the publisher publishes e.g. 10 messages. When the subscriber re-connects, it only receives 2 messages of those. If it repeatedly disconnects and re-connects, it receives 2 messages each time until all messages are received.

      Further investigation reveals that the problem lies in class org.apache.activemq.broker.region.PrefetchSubscription which does not re-check for further pending messages to be dispatched when committed message are removed from the list of dispatched but not yet acknowledged messages.

        Attachments

        1. PrefetchSubscription.patch
          0.5 kB
          Andreas Mattes
        2. TestClient.java
          5 kB
          Andreas Mattes
        3. PrefetchSubscriptionTest.java
          9 kB
          Andreas Mattes

          Activity

            People

            • Assignee:
              tabish Timothy A. Bish
              Reporter:
              andreasmattes Andreas Mattes
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: