[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] When does a topic get marked dead?
David Kerry wrote:
Hello,
We used to run xmlblaster v0.8 for quite some time, but have now
moved to v0.9.
Everything is running fine, but we have a problem where xmlblaster
keeps running out of memory.
We're using ram based storage for now (which we also used in the
v0.8 version). This shouldn't be a problem as our traffic is
fairly low and all messages are volatile.
The problem seems to be that a new topic gets created for every
message (when we publish we give a blank oid and let the server
fill it in). The server then gets all plugged up with hundreds
or thousands of topics with no messages in them.
We also see this behaviour when we use a database (Oracle) and
use it for all the topic/message storage. The database tables
just keep getting bigger and bigger and never seem to shrink.
This causes a problem when we restart xmlblaster too because it goes
and loads in all the old entries from the database which can take
a long time (10-15 minutes).
So I guess the question is - how can I force xmlblaster to check
for dead topics more often and clean them out?
Hi David,
you've summarized it quite exactly already.
The best solution is to use named topics as communication
channels. If you use key oid='' we generate
a complete topic on the fly for every message instance send.
If you still want to stick to tempary topics please use a
destroyDelay == 0.
In this case the topic is
destroyed immediately after dieing of your single messsage instance.
The default is 60000 millisec (= one minute) which is
the problem you see.
You should also send the messages volatile otherwise
the message instance lives forever in the history queue
and holds the topic alive as well
(switching off the history queue
with '-queue/history/maxEntries 0' has the
same effect in your case).
----------------------------------
Try this:
java org.xmlBlaster.Main -call[core] true
java javaclients.HelloWorldPublish -lifeTime 0 -destroyDelay 0
you can see in the server log how the topic disappears
(type 'd' in the server console to verify it).
Another way is to switch off history:
java javaclients.HelloWorldPublish -destroyDelay 0 -queue/history/maxEntries 0
as the message instance is not kept in history
as soon as it is delivered to all subscribers the topic
is unreferenced and dies immediately.
----------------------------------
You can start the server with
java org.xmlBlaster.Main -call[core] true -topic.destroyDelay 0
(or put it into xmlBlaster.properties). Now the default
topic destroy delay is 0. If a client publishes a longer
destroy delay this will win.
You should use version 0.903 as this is the most stable
on the 0.9x branch.
best regards
Marcel
--
http://www.xmlBlaster.org