Timing issue on consumer close can lead to unconsumed messages being
inadvertently marked as duplicates and not getting delivered
-----------------------------------------------------------------------------------------------------------------------------------
Key: AMQ-2572
URL: https://issues.apache.org/activemq/browse/AMQ-2572
Project: ActiveMQ
Issue Type: Bug
Components: Broker
Affects Versions: 5.3.0
Reporter: Gary Tully
Assignee: Gary Tully
Fix For: 5.3.1, 5.4.0
Intermittent failure of
activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2102Test.java on Linux.
Tracking this failure down, the problem of the hung test was missing messages,
part of the prefetch that were delivered while the consumer was closing. A
timing issue between the audit rollback of unconsumed messages and the
delivery of messages meant that some messages were not rolledback on close.
The use case has consumers that connect, consume a batch of 10 messages in
individual transactions and close. These operations complete before the
prefetch(1000) messages haven been delivered so there was concurrent delivery
and closure happing which sometimes resulted in the problem.
The fix is to ensure the consumer is removed from the session and closed prior
to doing the audit rollback on unconsumed messages.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.