Issue Details (XML | Word | Printable)

Key: AMQ-2052
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: David Jencks
Reporter: David Jencks
Votes: 2
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

unsubscribing a durable subscriber does not properly clean up undelivered messages

Created: 01/Jan/09 04:10 AM   Updated: 03/Sep/09 08:51 AM
Return to search
Issue 467 of 2405 issue(s)
<< Previous | AMQ-2052 | Next >>
Component/s: Message Store
Affects Version/s: 5.3.0
Fix Version/s: 5.3.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works AMQ-2052-test.patch 2009-01-01 04:15 AM David Jencks 4 kB


 Description  « Hide
Working on the tck I found a lot of messages like
2008-12-25 11:37:08,567 ERROR [RecoveryListenerAdapter] Message id ID:pb.local-56923-1230232035140-2:13:1:1:1 could not be recovered from the data store - already dispatched
in the log. I can reproduce this with the attached test case (It could probably be in a better module, but I started looking here.)

To see the error put a breakpoint at RecoveryListenerAdapter line 61 and run the test. The required steps to reproduce seem to be:

1. create a durable subscriber on a topic.
2. send a message to the topic.
3. close the subscriber and unsubscribe.
4. create a new durable subscriber on the same topic.



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
David Jencks added a comment - 01/Jan/09 04:15 AM
Test case to deomonstrate the problem. Note that the test passes, you have to put a breakpoint to see the problem.

David Jencks added a comment - 01/Jan/09 12:18 PM
The actual problem causing this is confusion over when to use a file-system-safened ID. Fixed in rev 730596.

I'm also changing the RecoveryListenerAdapter to throw an exception when it gets into this inconsistent state. Rev 730598.

I may try to simplify when and where the file system safening occurs. I also plan to move the test case to a better location.


David Jencks added a comment - 01/Jan/09 12:28 PM
Code inspection shows there are still a lot more confusions about when to use a file system safened name.

David Jencks added a comment - 01/Jan/09 01:44 PM
I think rev 730614 is an OK fix.... still need the test case.

David Jencks added a comment - 02/Jan/09 11:12 AM
One more major file name problem... rev 730817. Surprisingly this only caused 13 test failures.

Jim Taylor added a comment - 19/Jun/09 06:57 AM
What is the work around after the store gets into this state? Is there one?

Gary Tully added a comment - 25/Jun/09 09:22 AM
David, are you done with this or is there more work needed to get the tck passing?

David Jencks added a comment - 03/Sep/09 08:51 AM
I've fixed all the problems I can find related to this so I'm closing this.