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

Key: AMQ-1632
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: David Jencks
Reporter: David Jencks
Votes: 0
Watchers: 0
Operations

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

PrefetchSubscription may not wake up if messages delivered in transaction

Created: 23/Mar/08 11:30 PM   Updated: 06/Jun/08 07:15 AM
Component/s: Broker
Affects Version/s: 4.1.1
Fix Version/s: 4.1.2

Time Tracking:
Not Specified

Issue Links:
Related
 


 Description  « Hide
we noticed mdbs w/transaction on don't work if the prefetch size is less than the number of sessions for the mdb. There's an error in calculating the prefetchExtension in afterCommit and there's no notification that it might be time to send more messages. Apparently if the prefetch size is large enough one of the earlier acks triggers delivery of the next batch.

There are also a bunch of synchronization errors in some classes...



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
David Jencks - 24/Mar/08 12:22 AM
Fixed in rev 640336, branches 4.1. The actual fix is in activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java, other files contain thread-safety improvements. Leaving open till I can check trunk for similar problems.

David Jencks - 24/Mar/08 03:43 PM
I talked with Hiram a bit and we decided that the real problem was that prefetchSize was being calculated wrong. MDBs instances for an activation spec all share a single multithreaded consumer. So the prefetch size ought to be maxMessagesPerSession * maxSessions, so each mdb gets a chance at maxMessagesPerSession. Previously prefetchSize = maxMessagesPerSession which resulted in some mdbs never getting a chance to process anything if maxMessagesPerSession < maxSessions.

Still haven't looked at trunk.


David Jencks - 07/Apr/08 03:16 PM
Still a good idea to look at trunk.