You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by COURTAULT Francois <fr...@thalesgroup.com> on 2020/03/02 11:04:04 UTC

Is it possible to limit the storage in ActiveMQ ?

Hello everyone,

In case we have slow consumer and fast producer, for persistent messages, those ones are stored in db-x.log files.
In order to avoid a file system full, is there a way to limit the number of files or the number of messages or something else ?

Best Regards.




Re: RE: Is it possible to limit the storage in ActiveMQ ?

Posted by Martin Lichtin <li...@yahoo.com.INVALID>.
Hi

I've written a plugin for ActiveMQ that monitors disk space usage and that will close the connectors on low disk space (and re-open once disk space is again sufficient). Let me know know in case you are interested.

- Martin

On 02.03.2020 12:24, COURTAULT Francois wrote:
> Hello,
>
> I suppose you're talking about Artemis but I am using ActiveMQ and not Artemis.
> I should highlight this in my first post.
>   
> Any solution for ActiveMQ ?
>
> Best Regards.
>
> -----Original Message-----
> From: brusdev [mailto:bruscinodf@gmail.com]
> Sent: lundi 2 mars 2020 12:20
> To:users@activemq.apache.org
> Subject: Re: Is it possible to limit the storage in ActiveMQ ?
>
> Hi,
>
> the System will perform scans on the disk to determine if the disk is beyond a configured limit. These are configured through `max-disk-usage` in percentage. Once that limit is reached any message will be blocked. (unless the protocol doesn't support flow control on which case there will be an exception thrown and the connection for those clients dropped).
>
> https://activemq.apache.org/components/artemis/documentation/latest/paging.html#max-disk-usage
>
> Regards,
> Domenico
>
>
>
> --
> Sent from:http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

RE: Is it possible to limit the storage in ActiveMQ ?

Posted by COURTAULT Francois <fr...@thalesgroup.com>.
Hello,

I suppose you're talking about Artemis but I am using ActiveMQ and not Artemis.
I should highlight this in my first post.
 
Any solution for ActiveMQ ?

Best Regards.

-----Original Message-----
From: brusdev [mailto:bruscinodf@gmail.com] 
Sent: lundi 2 mars 2020 12:20
To: users@activemq.apache.org
Subject: Re: Is it possible to limit the storage in ActiveMQ ?

Hi,

the System will perform scans on the disk to determine if the disk is beyond a configured limit. These are configured through `max-disk-usage` in percentage. Once that limit is reached any message will be blocked. (unless the protocol doesn't support flow control on which case there will be an exception thrown and the connection for those clients dropped).

https://activemq.apache.org/components/artemis/documentation/latest/paging.html#max-disk-usage

Regards,
Domenico



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Is it possible to limit the storage in ActiveMQ ?

Posted by brusdev <br...@gmail.com>.
Hi,

the System will perform scans on the disk to determine if the disk is beyond
a configured limit. These are configured through `max-disk-usage` in
percentage. Once that limit is reached any message will be blocked. (unless
the protocol doesn't support flow control on which case there will be an
exception thrown and the connection for those clients dropped).

https://activemq.apache.org/components/artemis/documentation/latest/paging.html#max-disk-usage

Regards,
Domenico



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Is it possible to limit the storage in ActiveMQ ?

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi,

Just checked in the code, and you are right: storeUsage == db data (not journal log files).

Regards
JB

> Le 3 mars 2020 à 14:51, Tim Bain <tb...@alumni.duke.edu> a écrit :
> 
> Based on https://dzone.com/articles/temp-store-and-memory-percent, it
> sounds like storeLimit considers only the messages (db*.data) but not the
> redo log. So the amount of disk used in total could be a bit larger than
> the limit that's set.
> 
> Tim
> 
> On Mon, Mar 2, 2020, 6:48 AM Jean-Baptiste Onofre <jb...@nanthrax.net> wrote:
> 
>> Hi,
>> 
>> storeUsage == db.data + db.log + redo AFAIR.
>> 
>> Regards
>> JB
>> 
>>> Le 2 mars 2020 à 14:45, COURTAULT Francois <
>> francois.courtault@thalesgroup.com> a écrit :
>>> 
>>> Hello,
>>> 
>>> What about this question below ?
>>> 
>>>> Does it mean that if we set this value it will not create new
>>>> db-xxx.log files if the number of db-xxx.log files * 32 Mb >=
>> storeUsage value ?
>>> 
>>> Best Regards.
>>> 
>>> -----Original Message-----
>>> From: Jonathan Gallimore [mailto:jonathan.gallimore@gmail.com]
>>> Sent: lundi 2 mars 2020 14:14
>>> To: users@activemq.apache.org
>>> Subject: Re: Is it possible to limit the storage in ActiveMQ ?
>>> 
>>> I don't know if you can specify the store size via the URL - I suspect
>> not.
>>> You can provide an activemq.xml config file for ActiveMQ running in
>> TomEE - high level instructions are here:
>>> 
>> https://tomee.apache.org/latest/docs/jms-resources-and-mdb-container.html
>> - see the "Internal ActiveMQ Broker with activemq.xml" section.
>>> 
>>> I second JB's comment though - people worry about the kahadb logs not
>> getting removed and filling up the disk. Ensuring that all your messages
>> are consumed or purged will ensure these files are cleaned up, rather than
>> the store continually growing.
>>> 
>>> One other note, running ActiveMQ embedded in TomEE will mean that
>> resources are shared between the two. If you have large message volumes, it
>> may be worth swapping to an standalone ActiveMQ broker, and pointing TomEE
>> to that. Instructions for that are in the link above as well.
>>> 
>>> Jon
>>> 
>>> 
>>> 
>>> On Mon, Mar 2, 2020 at 1:01 PM COURTAULT Francois <
>> francois.courtault@thalesgroup.com> wrote:
>>> 
>>>> Hello Jean-Baptiste,
>>>> 
>>>> Just for you to know : we are using ActiveMQ in TomEE context.
>>>> 
>>>> You said: " You can setup the storeUsage in activemq.xml. It will
>>>> limit the data store."
>>>> Does it mean that if we set this value it will not create new
>>>> db-xxx.log files if the number of db-xxx.log files * 32 Mb >=
>> storeUsage value ?
>>>> BTW, do you know how to set this storeUsage value  in TomEE context ?
>>>> could it be passed in this connection string
>>>> broker:(tcp://localhost:61616)?usekahadb=true&amp;kahadb.directory=....
>> ?
>>>> 
>>>> Best Regards.
>>>> 
>>>> -----Original Message-----
>>>> From: Jean-Baptiste Onofre [mailto:jb@nanthrax.net]
>>>> Sent: lundi 2 mars 2020 12:30
>>>> To: users@activemq.apache.org
>>>> Subject: Re: Is it possible to limit the storage in ActiveMQ ?
>>>> 
>>>> Hi,
>>>> 
>>>> You can setup the storeUsage in activemq.xml. It will limit the data
>> store.
>>>> 
>>>> Regarding the db-xxx.log, it’s the transactional log files, and they
>>>> should be removed when a transaction is done. If you see a lot of
>>>> db-xxx.log, it means that you have lot of pending persistent messages.
>>>> A classic mistake is a DLQ never purge: ActiveMQ stores the
>>>> transaction (rotated every 32MB by default) for the pending message.
>>>> It means that retention is the date of the oldest pending message.
>>>> Check your DLQ and eventually use the sharedDeadLetterStrategy to
>>>> automatically purge the DLQ after a timeout.
>>>> 
>>>> A possible improvement (depending of the use case) is to reduce the
>>>> size of the journal in KahaDB.
>>>> 
>>>> If you need help for the setup of that, please let me know.
>>>> 
>>>> Regards
>>>> JB
>>>> 
>>>>> Le 2 mars 2020 à 12:04, COURTAULT Francois <
>>>> francois.courtault@thalesgroup.com> a écrit :
>>>>> 
>>>>> Hello everyone,
>>>>> 
>>>>> In case we have slow consumer and fast producer, for persistent
>>>> messages, those ones are stored in db-x.log files.
>>>>> In order to avoid a file system full, is there a way to limit the
>>>>> number
>>>> of files or the number of messages or something else ?
>>>>> 
>>>>> Best Regards.
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> 
>> 
>> 


Re: Is it possible to limit the storage in ActiveMQ ?

Posted by Tim Bain <tb...@alumni.duke.edu>.
Based on https://dzone.com/articles/temp-store-and-memory-percent, it
sounds like storeLimit considers only the messages (db*.data) but not the
redo log. So the amount of disk used in total could be a bit larger than
the limit that's set.

Tim

On Mon, Mar 2, 2020, 6:48 AM Jean-Baptiste Onofre <jb...@nanthrax.net> wrote:

> Hi,
>
> storeUsage == db.data + db.log + redo AFAIR.
>
> Regards
> JB
>
> > Le 2 mars 2020 à 14:45, COURTAULT Francois <
> francois.courtault@thalesgroup.com> a écrit :
> >
> > Hello,
> >
> > What about this question below ?
> >
> >> Does it mean that if we set this value it will not create new
> >> db-xxx.log files if the number of db-xxx.log files * 32 Mb >=
> storeUsage value ?
> >
> > Best Regards.
> >
> > -----Original Message-----
> > From: Jonathan Gallimore [mailto:jonathan.gallimore@gmail.com]
> > Sent: lundi 2 mars 2020 14:14
> > To: users@activemq.apache.org
> > Subject: Re: Is it possible to limit the storage in ActiveMQ ?
> >
> > I don't know if you can specify the store size via the URL - I suspect
> not.
> > You can provide an activemq.xml config file for ActiveMQ running in
> TomEE - high level instructions are here:
> >
> https://tomee.apache.org/latest/docs/jms-resources-and-mdb-container.html
> - see the "Internal ActiveMQ Broker with activemq.xml" section.
> >
> > I second JB's comment though - people worry about the kahadb logs not
> getting removed and filling up the disk. Ensuring that all your messages
> are consumed or purged will ensure these files are cleaned up, rather than
> the store continually growing.
> >
> > One other note, running ActiveMQ embedded in TomEE will mean that
> resources are shared between the two. If you have large message volumes, it
> may be worth swapping to an standalone ActiveMQ broker, and pointing TomEE
> to that. Instructions for that are in the link above as well.
> >
> > Jon
> >
> >
> >
> > On Mon, Mar 2, 2020 at 1:01 PM COURTAULT Francois <
> francois.courtault@thalesgroup.com> wrote:
> >
> >> Hello Jean-Baptiste,
> >>
> >> Just for you to know : we are using ActiveMQ in TomEE context.
> >>
> >> You said: " You can setup the storeUsage in activemq.xml. It will
> >> limit the data store."
> >> Does it mean that if we set this value it will not create new
> >> db-xxx.log files if the number of db-xxx.log files * 32 Mb >=
> storeUsage value ?
> >> BTW, do you know how to set this storeUsage value  in TomEE context ?
> >> could it be passed in this connection string
> >> broker:(tcp://localhost:61616)?usekahadb=true&amp;kahadb.directory=....
> ?
> >>
> >> Best Regards.
> >>
> >> -----Original Message-----
> >> From: Jean-Baptiste Onofre [mailto:jb@nanthrax.net]
> >> Sent: lundi 2 mars 2020 12:30
> >> To: users@activemq.apache.org
> >> Subject: Re: Is it possible to limit the storage in ActiveMQ ?
> >>
> >> Hi,
> >>
> >> You can setup the storeUsage in activemq.xml. It will limit the data
> store.
> >>
> >> Regarding the db-xxx.log, it’s the transactional log files, and they
> >> should be removed when a transaction is done. If you see a lot of
> >> db-xxx.log, it means that you have lot of pending persistent messages.
> >> A classic mistake is a DLQ never purge: ActiveMQ stores the
> >> transaction (rotated every 32MB by default) for the pending message.
> >> It means that retention is the date of the oldest pending message.
> >> Check your DLQ and eventually use the sharedDeadLetterStrategy to
> >> automatically purge the DLQ after a timeout.
> >>
> >> A possible improvement (depending of the use case) is to reduce the
> >> size of the journal in KahaDB.
> >>
> >> If you need help for the setup of that, please let me know.
> >>
> >> Regards
> >> JB
> >>
> >>> Le 2 mars 2020 à 12:04, COURTAULT Francois <
> >> francois.courtault@thalesgroup.com> a écrit :
> >>>
> >>> Hello everyone,
> >>>
> >>> In case we have slow consumer and fast producer, for persistent
> >> messages, those ones are stored in db-x.log files.
> >>> In order to avoid a file system full, is there a way to limit the
> >>> number
> >> of files or the number of messages or something else ?
> >>>
> >>> Best Regards.
> >>>
> >>>
> >>>
> >>
> >>
>
>

Re: Is it possible to limit the storage in ActiveMQ ?

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi,

storeUsage == db.data + db.log + redo AFAIR.

Regards
JB

> Le 2 mars 2020 à 14:45, COURTAULT Francois <fr...@thalesgroup.com> a écrit :
> 
> Hello,
> 
> What about this question below ?
> 
>> Does it mean that if we set this value it will not create new 
>> db-xxx.log files if the number of db-xxx.log files * 32 Mb >=  storeUsage value ?
> 
> Best Regards.
> 
> -----Original Message-----
> From: Jonathan Gallimore [mailto:jonathan.gallimore@gmail.com] 
> Sent: lundi 2 mars 2020 14:14
> To: users@activemq.apache.org
> Subject: Re: Is it possible to limit the storage in ActiveMQ ?
> 
> I don't know if you can specify the store size via the URL - I suspect not.
> You can provide an activemq.xml config file for ActiveMQ running in TomEE - high level instructions are here:
> https://tomee.apache.org/latest/docs/jms-resources-and-mdb-container.html - see the "Internal ActiveMQ Broker with activemq.xml" section.
> 
> I second JB's comment though - people worry about the kahadb logs not getting removed and filling up the disk. Ensuring that all your messages are consumed or purged will ensure these files are cleaned up, rather than the store continually growing.
> 
> One other note, running ActiveMQ embedded in TomEE will mean that resources are shared between the two. If you have large message volumes, it may be worth swapping to an standalone ActiveMQ broker, and pointing TomEE to that. Instructions for that are in the link above as well.
> 
> Jon
> 
> 
> 
> On Mon, Mar 2, 2020 at 1:01 PM COURTAULT Francois < francois.courtault@thalesgroup.com> wrote:
> 
>> Hello Jean-Baptiste,
>> 
>> Just for you to know : we are using ActiveMQ in TomEE context.
>> 
>> You said: " You can setup the storeUsage in activemq.xml. It will 
>> limit the data store."
>> Does it mean that if we set this value it will not create new 
>> db-xxx.log files if the number of db-xxx.log files * 32 Mb >=  storeUsage value ?
>> BTW, do you know how to set this storeUsage value  in TomEE context ?
>> could it be passed in this connection string 
>> broker:(tcp://localhost:61616)?usekahadb=true&amp;kahadb.directory=.... ?
>> 
>> Best Regards.
>> 
>> -----Original Message-----
>> From: Jean-Baptiste Onofre [mailto:jb@nanthrax.net]
>> Sent: lundi 2 mars 2020 12:30
>> To: users@activemq.apache.org
>> Subject: Re: Is it possible to limit the storage in ActiveMQ ?
>> 
>> Hi,
>> 
>> You can setup the storeUsage in activemq.xml. It will limit the data store.
>> 
>> Regarding the db-xxx.log, it’s the transactional log files, and they 
>> should be removed when a transaction is done. If you see a lot of 
>> db-xxx.log, it means that you have lot of pending persistent messages.
>> A classic mistake is a DLQ never purge: ActiveMQ stores the 
>> transaction (rotated every 32MB by default) for the pending message. 
>> It means that retention is the date of the oldest pending message.
>> Check your DLQ and eventually use the sharedDeadLetterStrategy to 
>> automatically purge the DLQ after a timeout.
>> 
>> A possible improvement (depending of the use case) is to reduce the 
>> size of the journal in KahaDB.
>> 
>> If you need help for the setup of that, please let me know.
>> 
>> Regards
>> JB
>> 
>>> Le 2 mars 2020 à 12:04, COURTAULT Francois <
>> francois.courtault@thalesgroup.com> a écrit :
>>> 
>>> Hello everyone,
>>> 
>>> In case we have slow consumer and fast producer, for persistent
>> messages, those ones are stored in db-x.log files.
>>> In order to avoid a file system full, is there a way to limit the 
>>> number
>> of files or the number of messages or something else ?
>>> 
>>> Best Regards.
>>> 
>>> 
>>> 
>> 
>> 


RE: Is it possible to limit the storage in ActiveMQ ?

Posted by COURTAULT Francois <fr...@thalesgroup.com>.
Hello,

What about this question below ?

> Does it mean that if we set this value it will not create new 
> db-xxx.log files if the number of db-xxx.log files * 32 Mb >=  storeUsage value ?

Best Regards.

-----Original Message-----
From: Jonathan Gallimore [mailto:jonathan.gallimore@gmail.com] 
Sent: lundi 2 mars 2020 14:14
To: users@activemq.apache.org
Subject: Re: Is it possible to limit the storage in ActiveMQ ?

I don't know if you can specify the store size via the URL - I suspect not.
You can provide an activemq.xml config file for ActiveMQ running in TomEE - high level instructions are here:
https://tomee.apache.org/latest/docs/jms-resources-and-mdb-container.html - see the "Internal ActiveMQ Broker with activemq.xml" section.

I second JB's comment though - people worry about the kahadb logs not getting removed and filling up the disk. Ensuring that all your messages are consumed or purged will ensure these files are cleaned up, rather than the store continually growing.

One other note, running ActiveMQ embedded in TomEE will mean that resources are shared between the two. If you have large message volumes, it may be worth swapping to an standalone ActiveMQ broker, and pointing TomEE to that. Instructions for that are in the link above as well.

Jon



On Mon, Mar 2, 2020 at 1:01 PM COURTAULT Francois < francois.courtault@thalesgroup.com> wrote:

> Hello Jean-Baptiste,
>
> Just for you to know : we are using ActiveMQ in TomEE context.
>
> You said: " You can setup the storeUsage in activemq.xml. It will 
> limit the data store."
> Does it mean that if we set this value it will not create new 
> db-xxx.log files if the number of db-xxx.log files * 32 Mb >=  storeUsage value ?
> BTW, do you know how to set this storeUsage value  in TomEE context ?
> could it be passed in this connection string 
> broker:(tcp://localhost:61616)?usekahadb=true&amp;kahadb.directory=.... ?
>
> Best Regards.
>
> -----Original Message-----
> From: Jean-Baptiste Onofre [mailto:jb@nanthrax.net]
> Sent: lundi 2 mars 2020 12:30
> To: users@activemq.apache.org
> Subject: Re: Is it possible to limit the storage in ActiveMQ ?
>
> Hi,
>
> You can setup the storeUsage in activemq.xml. It will limit the data store.
>
> Regarding the db-xxx.log, it’s the transactional log files, and they 
> should be removed when a transaction is done. If you see a lot of 
> db-xxx.log, it means that you have lot of pending persistent messages.
> A classic mistake is a DLQ never purge: ActiveMQ stores the 
> transaction (rotated every 32MB by default) for the pending message. 
> It means that retention is the date of the oldest pending message.
> Check your DLQ and eventually use the sharedDeadLetterStrategy to 
> automatically purge the DLQ after a timeout.
>
> A possible improvement (depending of the use case) is to reduce the 
> size of the journal in KahaDB.
>
> If you need help for the setup of that, please let me know.
>
> Regards
> JB
>
> > Le 2 mars 2020 à 12:04, COURTAULT Francois <
> francois.courtault@thalesgroup.com> a écrit :
> >
> > Hello everyone,
> >
> > In case we have slow consumer and fast producer, for persistent
> messages, those ones are stored in db-x.log files.
> > In order to avoid a file system full, is there a way to limit the 
> > number
> of files or the number of messages or something else ?
> >
> > Best Regards.
> >
> >
> >
>
>

Re: Is it possible to limit the storage in ActiveMQ ?

Posted by Jonathan Gallimore <jo...@gmail.com>.
I don't know if you can specify the store size via the URL - I suspect not.
You can provide an activemq.xml config file for ActiveMQ running in TomEE -
high level instructions are here:
https://tomee.apache.org/latest/docs/jms-resources-and-mdb-container.html -
see the "Internal ActiveMQ Broker with activemq.xml" section.

I second JB's comment though - people worry about the kahadb logs not
getting removed and filling up the disk. Ensuring that all your messages
are consumed or purged will ensure these files are cleaned up, rather than
the store continually growing.

One other note, running ActiveMQ embedded in TomEE will mean that resources
are shared between the two. If you have large message volumes, it may be
worth swapping to an standalone ActiveMQ broker, and pointing TomEE to
that. Instructions for that are in the link above as well.

Jon



On Mon, Mar 2, 2020 at 1:01 PM COURTAULT Francois <
francois.courtault@thalesgroup.com> wrote:

> Hello Jean-Baptiste,
>
> Just for you to know : we are using ActiveMQ in TomEE context.
>
> You said: " You can setup the storeUsage in activemq.xml. It will limit
> the data store."
> Does it mean that if we set this value it will not create new db-xxx.log
> files if the number of db-xxx.log files * 32 Mb >=  storeUsage value ?
> BTW, do you know how to set this storeUsage value  in TomEE context ?
> could it be passed in this connection string
> broker:(tcp://localhost:61616)?usekahadb=true&amp;kahadb.directory=.... ?
>
> Best Regards.
>
> -----Original Message-----
> From: Jean-Baptiste Onofre [mailto:jb@nanthrax.net]
> Sent: lundi 2 mars 2020 12:30
> To: users@activemq.apache.org
> Subject: Re: Is it possible to limit the storage in ActiveMQ ?
>
> Hi,
>
> You can setup the storeUsage in activemq.xml. It will limit the data store.
>
> Regarding the db-xxx.log, it’s the transactional log files, and they
> should be removed when a transaction is done. If you see a lot of
> db-xxx.log, it means that you have lot of pending persistent messages.
> A classic mistake is a DLQ never purge: ActiveMQ stores the transaction
> (rotated every 32MB by default) for the pending message. It means that
> retention is the date of the oldest pending message.
> Check your DLQ and eventually use the sharedDeadLetterStrategy to
> automatically purge the DLQ after a timeout.
>
> A possible improvement (depending of the use case) is to reduce the size
> of the journal in KahaDB.
>
> If you need help for the setup of that, please let me know.
>
> Regards
> JB
>
> > Le 2 mars 2020 à 12:04, COURTAULT Francois <
> francois.courtault@thalesgroup.com> a écrit :
> >
> > Hello everyone,
> >
> > In case we have slow consumer and fast producer, for persistent
> messages, those ones are stored in db-x.log files.
> > In order to avoid a file system full, is there a way to limit the number
> of files or the number of messages or something else ?
> >
> > Best Regards.
> >
> >
> >
>
>

RE: Is it possible to limit the storage in ActiveMQ ?

Posted by COURTAULT Francois <fr...@thalesgroup.com>.
Hello Jean-Baptiste,

Just for you to know : we are using ActiveMQ in TomEE context.

You said: " You can setup the storeUsage in activemq.xml. It will limit the data store."
Does it mean that if we set this value it will not create new db-xxx.log files if the number of db-xxx.log files * 32 Mb >=  storeUsage value ?
BTW, do you know how to set this storeUsage value  in TomEE context ? could it be passed in this connection string broker:(tcp://localhost:61616)?usekahadb=true&amp;kahadb.directory=.... ?

Best Regards.

-----Original Message-----
From: Jean-Baptiste Onofre [mailto:jb@nanthrax.net] 
Sent: lundi 2 mars 2020 12:30
To: users@activemq.apache.org
Subject: Re: Is it possible to limit the storage in ActiveMQ ?

Hi,

You can setup the storeUsage in activemq.xml. It will limit the data store.

Regarding the db-xxx.log, it’s the transactional log files, and they should be removed when a transaction is done. If you see a lot of db-xxx.log, it means that you have lot of pending persistent messages.
A classic mistake is a DLQ never purge: ActiveMQ stores the transaction (rotated every 32MB by default) for the pending message. It means that retention is the date of the oldest pending message.
Check your DLQ and eventually use the sharedDeadLetterStrategy to automatically purge the DLQ after a timeout.

A possible improvement (depending of the use case) is to reduce the size of the journal in KahaDB.

If you need help for the setup of that, please let me know.

Regards
JB

> Le 2 mars 2020 à 12:04, COURTAULT Francois <fr...@thalesgroup.com> a écrit :
> 
> Hello everyone,
> 
> In case we have slow consumer and fast producer, for persistent messages, those ones are stored in db-x.log files.
> In order to avoid a file system full, is there a way to limit the number of files or the number of messages or something else ?
> 
> Best Regards.
> 
> 
> 


Re: Is it possible to limit the storage in ActiveMQ ?

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi,

You can setup the storeUsage in activemq.xml. It will limit the data store.

Regarding the db-xxx.log, it’s the transactional log files, and they should be removed when a transaction is done. If you see a lot of db-xxx.log, it means that you have lot of pending persistent messages.
A classic mistake is a DLQ never purge: ActiveMQ stores the transaction (rotated every 32MB by default) for the pending message. It means that retention is the date of the oldest pending message.
Check your DLQ and eventually use the sharedDeadLetterStrategy to automatically purge the DLQ after a timeout.

A possible improvement (depending of the use case) is to reduce the size of the journal in KahaDB.

If you need help for the setup of that, please let me know.

Regards
JB

> Le 2 mars 2020 à 12:04, COURTAULT Francois <fr...@thalesgroup.com> a écrit :
> 
> Hello everyone,
> 
> In case we have slow consumer and fast producer, for persistent messages, those ones are stored in db-x.log files.
> In order to avoid a file system full, is there a way to limit the number of files or the number of messages or something else ?
> 
> Best Regards.
> 
> 
>