The journal exists in order to restore the persistent messages in the
broker's memory when it restarts. Therefore, the amount of data in the
journal is directly proportional to the amount of data in memory.
Therefore, if you want to control the amount of data in the journal you can
do so by controlling the amount of data in memory and to do that you
configure the size of your addresses (e.g. per-address via max-size-bytes
[1] or max-size-messages [1] or globally via global-max-size [2] or
global-max-messages [3]). When the address gets full the
address-full-policy is enforced which might also result in writing data to
disk (i.e. if using PAGE). In order to prevent the disk from filling up you
can use max-disk-usage [4] or min-disk-free [5].


Justin

[1]
https://activemq.apache.org/components/artemis/documentation/latest/paging.html#configuration-2
[2]
https://activemq.apache.org/components/artemis/documentation/latest/paging.html#global-max-size
[3]
https://activemq.apache.org/components/artemis/documentation/latest/paging.html#global-max-messages
[4]
https://activemq.apache.org/components/artemis/documentation/latest/paging.html#max-disk-usage
[5]
https://activemq.apache.org/components/artemis/documentation/latest/paging.html#minimum-disk-free

On Fri, Mar 1, 2024 at 5:05 AM andrea bisogno <bisoma...@hotmail.it> wrote:

> Hi support,
> I would need some insights about the Artemis Broker Persistence feature.
> Looking into the documentation at
> https://activemq.apache.org/components/artemis/documentation/latest/persistence.html,
> I was not able to find anything about possible limits to disk size usage
> once te File Journal persistence option is enabled.
> We would like to understand if (and how) it is possible to limit the
> number of journal files produced, and so be able to limit the disk size
> used by the persistence.
> Is it possible to configure, for example, a maximum numer of Journal
> files, and make the broker reuse the first one (i.e. the oldest file) once
> the max number of files is reached, overwriting the oldest data?
> Basically, it would be important for us being able to avoid disk
> saturation, to avoid dangerous situation where the persistence can cause
> unexpected issues due to too much storage space used.
>
> Many thanks in advance for your support,
>
> Andrea
>

Reply via email to