activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <>
Subject [jira] Commented: (AMQ-2159) One evicted message out of two is delivered to the consumer
Date Fri, 13 Mar 2009 16:28:40 GMT


Gary Tully commented on AMQ-2159:

Yannick, thanks for the test case. Could you reattach (delete and attach again) it to the
issue with a license grant. There is a check box on the Attach file page. Otherwise we can't
include your test case. Thanks

> One evicted message out of two is delivered to the consumer
> -----------------------------------------------------------
>                 Key: AMQ-2159
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: Windows Xp, Java 5, ActiveMQ 5.2
>            Reporter: Yannick
>         Attachments:
> A problem in message eviction seems to cause a strange behavior of message delivery.
After a slow consumer consumed it's prefetched messages, it start receiving one message out
of two that were produced. When stepping into the sources I noticed that one message evicted
out of two is dispatched to the destination even if no message have been consumed during that
time. The problem seems to be in the class 'TopicSubscription'. This is what I found:
> - When a message is discarded dequeueCounter is incremented. 
> - Then next time a message arrives it is evicted then dispatchMatched is called. 
> - Because dequeueCounter have been called without any message dispatched, isFull() return
> - As a result it assumes there is an empty room in the prefetch and dispatch the message.

> The following example show what I expect against what I get when I produce 100 messages
with a unique ID then consume 10 message and output the message ID. Prefetch size is 5. and
constantPendingMessageLimitStrategy limit="5"
> Expected:
> 0, 1, 2, 3, 4, 95, 96, 97, 98, 99
> What I really get
>  0, 1, 2, 3, 4, 5, 7, 9, 11, 13
> I made a test application and a unit test, I didn't found how to attach it to the issue.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message