activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fehm <>
Subject Re: What does the topic size attribute actually mean ?
Date Mon, 07 Dec 2009 13:47:27 GMT


walec51 wrote:
> Does the mean that all the messages are still stored somewhere ?
> My recovery policy is <lastImageSubscriptionRecoveryPolicy/> .
> I'm experiencing a memory leak in ActiveMQ and I'm trying to find out
> whats cosing it. The funny thing is that when I delete all the topics and
> queue on the server the memory usage doesn't lower a bit.

Three things come into my mind,which might be helpful :

1. Unless you have switched message persistency off, messages are always
stored before distribution to subscribers. If you have disabled spooling
messages to disk, it's very likely to fill up the Broker memory.

1. <lastImageSubscriptionRecoveryPolicy/> works only for retroactive
subscriptions, means that only if your clients have 'retroactive=true'
enabled they will see -independent of when a message has been sent- always
the last one. Again ,this means that the server will store the message until
a new one comes in. Do have a large number of topics ?

2. Of course a memory leak can always happen due to a bug in the server.
However, before you should check that your clients "behave well". Make sure
that they don't have resource leaks (e.g. not closing
subscription/connection objects). Unfortunately, I once ran into this and
banged my head against the wall for a while. 
Watch the subscription stats (inflight count is a good indicator, that the
client makes problems). I recommend to use the jconsole to check these
How many topics do you use/create. Remember that if the server will always
keep your topic, hence using memory. In my experience, with 50K topics you
need > 1024M JVM size for sure.


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

View raw message