Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: MB-825
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Susan Javurek
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
FUSE Message Broker

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

Created: 18/Feb/11 03:55 PM   Updated: 18/Feb/11 03:55 PM
Component/s: broker
Affects Version/s: 5.3.1-fuse-01-00, 5.4.2-fuse-01-00
Fix Version/s: None


 Description  « Hide
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.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Susan Javurek made changes - 18/Feb/11 03:55 PM
Field Original Value New Value
Link This issue blocks PROD-573 [ PROD-573 ]