activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerome Banks" <>
Subject What does the UsageManager actually measure??
Date Tue, 13 Feb 2007 22:14:15 GMT
 This may seem like a strange question, but what does the ActiveMQ
MemoryManager class actually do, or what is the usage that it tries to

We have a Lingo application which might get swamped with requests under
certain circumstances.  This causes the request queue lengths to grow quite
large.  The service threads can ultimately process these requests, but it
can take a long time, and our clients end up all timing out. (One way around
this might be making our services @OneWay, but unfortunately that requires
extensive refactoring of our application)

   We'd like a situation where the broker would throw a runtime exception if
the request queue length grows too large. One way to do this, we thought
would be to limit the available memory used by the broker, by defining a
UsageManager for our broker, and setting the limit to a fairly small value
(64K). This however doesn't seem to do anything, however. From jconsole, we
can see that MemoryPercentageUsed is always 0, even if there are a large
number of large messages in the Lingo request queue.  (We also try to set
the memoryLimit on the PolicyEntry on the queue. That also seems to have no
effect).  We even set up  a custom UsageListener on the UsageManager. That
seems to be invoked every so often when requests come in, but percent used
just goes back and forth between 0 and 2 percent.

   Something seems to be measured, but it doesn't seem to be the total size
of objects in that queue.  What are doing wrong? Is there a simpler way to
limit the total number of messages in queue?

BTW , we're running ActiveMQ 4.0.2 with Lingo 1.3

thanks if anyone has any insight ...
 --- jerome

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message