You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Yenki <ya...@gmail.com> on 2009/03/09 16:38:24 UTC

Possible defect in Message Eviction

Hi,

I’m using ActiveMQ 5.2 and I’m experiencing a strange behavior with
OldestMessageEvictionStrategy. I have a very fast producer and a very slow
consumer and I set this policy in my xml.

          <policyEntry topic=">">
              <pendingMessageLimitStrategy> 
                 <constantPendingMessageLimitStrategy limit="10"/> 
               </pendingMessageLimitStrategy> 
          </policyEntry>


After my consumer have consumed prefetched & pending messages it start
receiving one message out of two that were produced. I thought I didn’t
understand how MessageEvictionStrategy were working so I download the
sources and stepped into. What I realized is that one message evicted out of
two is dispatched to the destination even of no message have been consumed
during that time. 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 false.
- As a result it assumes there is an empty room in the prefetch and dispatch
the message.

Is this by design or I'm facing an Issue? Should I write a JIRA about this? 

Thanks

Yannick


-- 
View this message in context: http://www.nabble.com/Possible-defect-in-Message-Eviction-tp22413496p22413496.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Possible defect in Message Eviction

Posted by Yenki <ya...@gmail.com>.
I just create a JIRA Issue for this. 
https://issues.apache.org/activemq/browse/AMQ-2159 AMQ-2159 
Yannick

Hi,

I’m using ActiveMQ 5.2 and I’m experiencing a strange behavior with
OldestMessageEvictionStrategy. I have a very fast producer and a very slow
consumer and I set this policy in my xml.

          <policyEntry topic=">">
              <pendingMessageLimitStrategy> 
                 <constantPendingMessageLimitStrategy limit="10"/> 
               </pendingMessageLimitStrategy> 
          </policyEntry>


After my consumer have consumed prefetched & pending messages it start
receiving one message out of two that were produced. I thought I didn’t
understand how MessageEvictionStrategy were working so I download the
sources and stepped into. What I realized is that one message evicted out of
two is dispatched to the destination even of no message have been consumed
during that time. 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 false.
- As a result it assumes there is an empty room in the prefetch and dispatch
the message.

Is this by design or I'm facing an Issue? Should I write a JIRA about this? 

Thanks

Yannick


-- 
View this message in context:
http://www.nabble.com/Possible-defect-in-Message-Eviction-tp22413496p22413496.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.




-- 
View this message in context: http://www.nabble.com/Possible-defect-in-Message-Eviction-tp22415827p22477722.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.