You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Denis Bazhenov <ba...@farpost.com> on 2010/07/27 07:19:56 UTC

When ActiveMQ does flush non persistent messages to disk

We have some administrative task, from time to time. For example, move
database on another physical server etc. It's very easy when write to
database in offloaded with ActiveMQ. We simply turn off the consumer
updating database, move database, switching read to a new database, and
finally, turning on consumer with new database.

It's all works fine when task quite small (in terms of time). But if we
turn off consumer for a long period of time (for example a day), we
experience problems with non persisted messages. ActiveMQ try to hold
them all in memory, so soon a later it hangs up with OutOfMemoryError.

This shouldn't be a big problem, as of ActiveMQ have special store (Temp
store) for flushing non persistent messages on a disk. I'm play around
with some configuration options (memoryUsage, tempUsage, queue memory
limit policies), but can not figure it out, how to deal with this
problem.

Thanks a lot.
-- 
Denis Bazhenov <ba...@farpost.com>
FarPost


Re: When ActiveMQ does flush non persistent messages to disk

Posted by Gary Tully <ga...@gmail.com>.
The global systemUsage memory limit is the trigger for messages to be
spooled to disk. Per destination memory limits can be used for flow
control and to limit the destinations use of a cache, but pending
messages are only spooled to disk when the system usage limits are
reached.

On 27 July 2010 06:19, Denis Bazhenov <ba...@farpost.com> wrote:
> We have some administrative task, from time to time. For example, move
> database on another physical server etc. It's very easy when write to
> database in offloaded with ActiveMQ. We simply turn off the consumer
> updating database, move database, switching read to a new database, and
> finally, turning on consumer with new database.
>
> It's all works fine when task quite small (in terms of time). But if we
> turn off consumer for a long period of time (for example a day), we
> experience problems with non persisted messages. ActiveMQ try to hold
> them all in memory, so soon a later it hangs up with OutOfMemoryError.
>
> This shouldn't be a big problem, as of ActiveMQ have special store (Temp
> store) for flushing non persistent messages on a disk. I'm play around
> with some configuration options (memoryUsage, tempUsage, queue memory
> limit policies), but can not figure it out, how to deal with this
> problem.
>
> Thanks a lot.
> --
> Denis Bazhenov <ba...@farpost.com>
> FarPost
>
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com