activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbekas <john+nab...@bekas.org>
Subject Re: Queue PolicyEntry Eviction Not working
Date Tue, 14 Apr 2009 19:40:05 GMT


yesnid wrote:
> 
> Maybe I am looking at this incorrectly, but this seems broken to me, why
> do messages need to have a TTL to be evicted, I should think that eviction
> is seperate from expiration, and two what do you mean that I need activity
> on a queue in order to get messages evicted? That sounds like I do have to
> have a consumer.
> 

Here is my understanding from samples I've created.  Whether this is correct
is a mystery, the documentation is vague with regards to eviction.

For queues, messageEvictionStrategy only works to remove expired messages
from the queue.  If your queue fills up, the producers are told to wait
until there is more space for new messages.  In this case, eviction and
expiration are tied together.

For topics, messageEvictionStrategy works to remove messages that a slow
consumer cannot process.  There are other settings related to this that
determine how many messages to keep, see pendingMessageLimitStrategy.  

Today, I found a 
http://www.nabble.com/Re%3A-Message-selectors-%2B-MDB-p19744296.html post by
James Strachan  in which he states,


James.Strachan wrote:
> 
> Though eviction is only really for topics, not queues 
> 

As I said, it's vague... Is it "only really for topics", or will it not work
with queues at all?

Also, looking back at the 
http://activemq.apache.org/slow-consumer-handling.html Slow Consumer
Handling  , I now see that all of the examples are with topics, not with
queues.  However, it doesn't specify that the settings described are only
for topics.   

At any rate, the eviction stuff appeared to work on my test cases.  I
suppose I could try it without and see if that setting is useless when
applied to queues.


Why do you need a consumer?  My guess is that ActiveMQ isn't going to
repeatedly scan the entire queue looking for expired messages, it has better
things to do.  If no one is asking for messages, it would rather spend time
focusing on live producers and consumers.

Why would you want or need a queue with no consumers?  

Again, I hope that helps.


-----
Freelance Application Development Consultant
LinkedIn Profile:  http://www.linkedin.com/in/johnbekasjr
http://www.linkedin.com/in/johnbekasjr 

-- 
View this message in context: http://www.nabble.com/Queue-PolicyEntry-Eviction-Not-working-tp23026416p23046544.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message