Issue Details (XML | Word | Printable)

Key: AMQ-736
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Unassigned
Reporter: Danielius Jurna
Votes: 0
Watchers: 0
Operations

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

Broker is not delivering all messages to slow consumer

Created: 02/Jun/06 09:58 PM   Updated: 05/Jun/06 02:12 PM
Return to search
Component/s: Broker
Affects Version/s: 4.0
Fix Version/s: 4.0.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works slowConsumer.patch 2006-06-04 09:50 PM Danielius Jurna 0.7 kB
Java Source File SlowConsumerTest.java 2006-06-02 09:58 PM Danielius Jurna 4 kB
Environment: Linux/Windows Java 1.5.0_06

Patch Info: Patch Available


 Description  « Hide
When producer produces more messages than consumer can handle, after some time some messages are not delivered to the consumer (they are just skipped). To get those messages from the broker, you need to reconnect the consumer. It seems that this bug only occures if message persistance is turned on in the broker.

 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Danielius Jurna added a comment - 04/Jun/06 09:49 PM
The problem is not in the broker, but in JournalMessageStore. Whet JoiurnalMessageStore is performing checkpoint, consumers doesn't receive messages during that checkpoint.
The bug is that during checkpoint, messages are removed from cpAddedMessageIds list, and as I understand, this is temporal message store used during checkpoint. And during checkpoint messages shouldn't be removed from there, because consumer is using this member to get messages, which are already removed from short term storage, but not yet added to long term storage. So fix is preatty simple.
I'm adding the patch against the main trunk of ActiveMQ.
Hope some ActiveMQ developers will take a look.

James Strachan added a comment - 05/Jun/06 10:38 AM
Have committed your test case - many thanks for that - its here...

https://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java

I made one or two minor changes (using a name local to the test case for the queue to avoid tests treading on each others toes and failing rather than hanging if enough messages are not returned in time). The test case works fine on OS X - both before my changes and after them - before applying your patch to fix the test case. Will investigate further


James Strachan added a comment - 05/Jun/06 01:48 PM
Patch and test case applied - many thanks!

James Strachan added a comment - 05/Jun/06 02:12 PM
added patch available flag