FUSE Message Broker
  1. FUSE Message Broker
  2. MB-825

Loss of messages when deleting the entire activemq-data/kr-store/

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 5.3.1-fuse-01-00, 5.4.2-fuse-01-00
    • Fix Version/s: None
    • Component/s: broker
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      There is a message loss of persisted messages in latest ActiveMQ, using AMQ Persistent Store. The following test case for both 5.3.0.1-fuse and 5.4.2-fuse-01-00 exemplifies the problem. Here's the broker configuration:

      <beans
        xmlns="http://www.springframework.org/schema/beans"
        xmlns:amq="http://activemq.apache.org/schema/core"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans 
          http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://activemq.apache.org/schema/core 
          http://activemq.apache.org/schema/core/activemq-core.xsd">
      
        
          <broker xmlns="http://activemq.apache.org/schema/core" 
      		brokerName="localhost" 
      		dataDirectory="${activemq.base}/data" 
      		destroyApplicationContextOnStop="true">
       
              <managementContext>
                  <managementContext createConnector="true" connectorPort="2010"/>
              </managementContext>
      
              <persistenceAdapter>
                  <amqPersistenceAdapter directory="activemq-data" maxFileLength="1mb"
      				directoryArchive="activemq-data-archive" archiveDataLogs="true" 
      				recoverReferenceStore="true"/>
              </persistenceAdapter>
              
              <transportConnectors>
                  <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
              </transportConnectors>
      
          </broker>
      </beans>
      

      Then, run the following script to populate the AMQ Store data logs. This script has been carefully thought out to leave a message in data-1, the first log file. Note that the script should be run in the ActiveMQ examples/ directory.

      call ant -Dsubject=Store1 -Ddurable=true -Dmax=1 producer
      call ant -Dsubject=Store2 -Ddurable=true -Dmax=1 producer
      call ant -Dsubject=Store3 -Ddurable=true -Dmax=200 -DmessageSize=5000 producer
      call ant -Dsubject=Store2 -Ddurable=true -Dmax=1 consumer
      call ant -Dsubject=Store3 -Ddurable=true -Dmax=200 -DmessageSize=5000 producer
      call ant -Dsubject=Store3 -Ddurable=true -Dmax=400 consumer
      

      After running this script, you should see 3 data files in the AMQ Store journal directory.

      Now, shutdown the broker, and delete the KR indices (activemq-data/kr-store/*).

      On restart, the AsyncDataManager thread will go through the data files, and errantly determine that data-1 has no references. It moves data-1 to the archive directory. As a result, we see that the message we sent to queue 'Store1' is missing.

      Only deleting the "state" folder in activemq-data/kr-store/ resolves this issue, however, the customer would like to see the use case work when deleting the entire kr-store file.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Susan Javurek
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: