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-381
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Gary Tully
Reporter: Martin Murphy
Votes: 0
Watchers: 0
Operations

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

Consumed messages re-appearing in the broker

Created: 05/Aug/08 01:12 PM   Updated: 03/Sep/08 02:42 PM  Due: 18/Aug/08
Component/s: broker
Affects Version/s: 5.1.0.0-fuse
Fix Version/s: 5.0.0.20-fuse

File Attachments: 1. Zip Archive MB-381.zip (22 kB)

Environment: Tested on Windows, using JDK 1.6.0_07, but probably a problem on all platforms since it is a clear logic problem.

External Issue URL: https://issues.apache.org/activemq/browse/AMQ-1926


 Description  « Hide
This is probably more of a problem with how the broker recovers from failures in conjunction with the database rather than a core broker failure.

The attached project clearly shows the problem where messages which have been consumed may re-appear after the broker restarts from a kill -9, forced kill in Windows, or a stop in the eclipse environment.

To run the test case in eclipse:

  1. Run the JUnit test: SpringActiveMQTest.java (Explanations are given in comments of the test case) and let it run about 1 minute. It will shut-down automatically for a graceful shut-down.
  2. Run the Java main class: SpringActiveMQ.java. Start jconsole from jdk6 on url: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi. As you can see, there is only 1 message on the queue, as expected from the test. Kill the broker with the stop button of eclipse.
  3. Again, run the Java main class: SpringActiveMQ.java. It will force ActiveMQ to recover. Start jconsole from jdk6 on url: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi. As you can see, there is 2 messages on the queue. One message re-pop. Explanation is given in comments of the junit test.

This is due to the fact that the deletion of a message was stored in a data file that is archived, but the fact that the message was sent to the broker is stored in another data file that remains active. So when the broker restarts it doesn't realise that the message was already removed and adds it again.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Martin Murphy made changes - 05/Aug/08 01:15 PM
Field Original Value New Value
Attachment MB-381.zip [ 11997 ]
Martin Murphy made changes - 05/Aug/08 01:22 PM
Link This issue fixes DEV-1047 [ DEV-1047 ]
Martin Murphy made changes - 06/Aug/08 04:43 AM
Comment [ A comment with security level 'Developers' was removed. ]
Martin Murphy made changes - 06/Aug/08 09:06 AM
Priority Critical [ 2 ] Blocker [ 1 ]
deleted user made changes - 06/Aug/08 12:42 PM
Due Date 2008-08-18 00:00:00.0
Gary Tully made changes - 20/Aug/08 08:13 AM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 5.0.0.19-fuse [ 10260 ]
Resolution Fixed [ 1 ]
Gary Tully made changes - 03/Sep/08 10:45 AM
Resolution Fixed [ 1 ]
Status Resolved [ 5 ] Reopened [ 4 ]
Assignee Rob Davies [ rajdavies ] Gary Tully [ gtully ]
External Issue URL https://issues.apache.org/activemq/browse/AMQ-1926
Gary Tully made changes - 03/Sep/08 02:42 PM
Status Reopened [ 4 ] Resolved [ 5 ]
Fix Version/s 5.0.0.20-fuse [ 10261 ]
Fix Version/s 5.0.0.19-fuse [ 10260 ]
Resolution Fixed [ 1 ]