Re: deterministic memory usage, could you try a 5.4-SNAPSHOT. Usage should be deterministic in your case. If the behavior persists with a current snapshot, could you raise a jira issue and attach your test case. thanks?
2009/11/23 moreno9000 <moreno.ma...@italtel.it> > > Yes, > when a procuder calls send() method, I'd like to intercept > the request, verify number of messages in destination queue, > throw an exception if number of msg, after this last send(), > exceed a predefined limit. > > In AMQ 5.3 I can define a memoryLimit for a queue but > there are two "problems". > > 1) memoryLimit is expressed in Kb/Mb and not in number of messages. > > 2) I specified a memoryLimit for a queue (1 Mb) > I ran 10 tests where a producer send thousand of messages to the queue. > I verified that number of messages sent to the queue, before a > memoryLimit exception > is thrown by AMQ, differ a lot from one test to another (test1=15885 > msg, > test2=29362, test3=32413 then 15861, 24260, 12276, 11692, 24306, > 24762, 20269). > I expected a deterministic result. > > For this reason I tried to follow the "interceptor way". > > Thank you, > Moreno > > > bsnyder wrote: > > > > > > So you're trying to control the number of messages in a queue at any > > given time. Are you trying to prevent any new messages from being sent > > to the queue or what? Please explain the use case in more detail. > > > > I'm not sure yet if this applies, but you could instead configure an > > eviction policy to limit the number of messages held in a destination > > based on some criteria: > > > > http://activemq.apache.org/slow-consumer-handling.html > > > > Bruce > > -- > > > > > > -- > View this message in context: > http://old.nabble.com/How-to-%22activate%22-an-interceptor-tp26478807p26480505.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- http://blog.garytully.com Open Source Integration http://fusesource.com