There is currently no way to shrink the index file and no plans to add
that. The index file generally grows and stabilizes with your use case
based on the max number of messages the broker will have stored at any
given time.  There's not really any reason to need to worry about shrinking
the index file and it shouldn't grow much larger than 10% of your max
journal size.  This is just an estimate though because the index could in
theory get much larger if you have a ton of really small messages (< 1KB)
to track and it would be smaller if you have lots of big messages
(megabytes)

On Wed, May 29, 2019 at 7:51 AM yanghao441286376 <441286...@qq.com> wrote:

> Hi, All,
>
> In my activemq instance(5.15.4 or 5.15.9), I find that the kahadb index
> file
> is larger than the journal file.
>
> As far as I know, want to shrink it the only way right now is to *stop the
> broker, delete the index* and restart so it does a replay and rebuilds the
> index but the size would just grow again as messages flow.  And most of the
> time, not allowed to stop the broker on PRD env.
>
> Do you plan to have other proper ways to shrink the index file in future
> ActiveMQ versions? Thanks.
>
> Log attached:
> [root@localhost kahadb]# pwd
> /opt/mq/apache-activemq-5.15.9/data/kahadb
> [root@localhost kahadb]# du -sh *
> 19M     db-87.log
> 531M    db.data
> 3.2M    db.redo
> 4.0K    lock
>
> Kind regards,
> air
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Reply via email to