activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yenki <>
Subject Possible defect in Message Eviction
Date Mon, 09 Mar 2009 15:38:24 GMT


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=">">
                 <constantPendingMessageLimitStrategy limit="10"/> 

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
- 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? 



View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message