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

ActiveMQ stop delivering messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 5.15.4
    • 5.16.0
    • None
    • None

    Description

      We have a problem with ActiveMQ 5.15.4, it stop deliver messages to clients.

      This happens completely randomly and we are not able to give a test case that reproduce the problem

      Activemq is configured to use the « memoryPersistenceAdapter »

       

      When examining memory dumps, we identified incoherent situation in the class MemoryMessageStore that can lead to stop delivering messages. When :

      • MemoryMessageStore.recoverNextMessages(...) is called
      • « lastBatchId » is not null
      • « messageTable » does not contains any entry with « lastBatchId » as key

      no messages are recovered

       

      We added logs to try to understand how it is possible to have a non null « lastBatchId » and «  messageTable » with no entry having « lastBatchId » as key.

       

      We noticed that the method setBatch is called with a non null « messageId » parameter, but no message with this id is inserted in « messageTable ». After that, when the method MemoryMessageStore.recoverNextMessages(...) is called, it does nothing and no messages are recoverd. And the system go in a what looks like an endless loop.

       

      We are testing a temporary solution by resetting « lastBatchId » to null when the incoherent situation is detected.

       

      Can you help us resolving the problem at the source and not just get around.

      I joined modified source code of the class MemoryMessageStore and an extract of the log file.

      Attachments

        1. MemoryMessageStore.java
          8 kB
          Nezih BEN FREDJ
        2. activemq.log
          95 kB
          Nezih BEN FREDJ
        3. MemoryMessageStoreQueueCursorTest.java
          5 kB
          Nezih BEN FREDJ

        Activity

          People

            gtully Gary Tully
            nezih Nezih BEN FREDJ
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: