History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: AMQ-1714
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Rob Davies
Reporter: Gary Tully
Votes: 1
Watchers: 1
Operations

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

messages get dispatched to a removed consumer, locked and remain unavailable - appear as missing

Created: 08/May/08 08:56 AM   Updated: Tuesday 03:52 AM
Component/s: Broker
Affects Version/s: 5.1.0
Fix Version/s: 5.2.0

Time Tracking:
Not Specified

File Attachments: 1. Text File Licensed for inclusion in ASF works amq1714.patch (15 kb)


Patch Info: Patch Available


 Description  « Hide
with failover transport. multiple non persistent producers and consumers on a single queue and transport disconnects, it is possible for a messages to get dispatched to a removed subscription or consumer. These messages are locked and hence cannot get dispatched to new consumers when the network ins reconnected. From a consumer perspective it looks like there are missing messages.

The problem occurs is messages are being dispatched while subscription removal occurring. The list of consumers is modified, inflight messages are removed from the subscription, unlocked and re dispatched. However, dispatch of messages is not synchronised with this removal and it is possible to dispatch to a removed consumer. Any such messages will be locked and never re dispatched.



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Gary Tully - 08/May/08 09:01 AM
this patch provides a test case that shows the problem and a fix that adds additional synchronisation to the queue dispatch method.
removing a subscription needs to be synchronized with the use of subscriptions. This seems to be the intended use of dispatchLock but up till now dispatch() does not lock dispatchLock.

Rob Davies - 13/May/08 03:52 AM
Patch applied in SVN revision 655805