When ActiveMQ does flush non persistent messages to disk

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

When ActiveMQ does flush non persistent messages to disk

Denis Bazhenov
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 <[hidden email]>
FarPost

Reply | Threaded
Open this post in threaded view
|

Re: When ActiveMQ does flush non persistent messages to disk

gtully
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 <[hidden email]> 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 <[hidden email]>
> FarPost
>
>



--
http://blog.garytully.com

Open Source Integration
http://fusesource.com