Title: ActiveMQ KahaDB archive data logs does not work
Tags: activemq;kahadb
Question: I have been trying to configure KahaDB to archive the data logs with the configuration below:
<persistenceAdapter&gt;
<kahaDB directory="${activemq.data}/kahadb" journalMaxFileLength="15mb" archiveDataLogs="true" directoryArchive="${activemq.data}/archive" /&gt;
</persistenceAdapter&gt;
It creates an archive directory as configured however it is NOT moving the data log file into that directory.
According to ActiveMQ doc, the cleanup interval is the 30s by default during which it should decide to either delete the data log file or move it to an archive folder. But for some reason, it is not working for me.
Also the db-N.log file inside /kahadb directory is not rolling. At any given time there is only one file db-1.log in that directory. I'm not sure if this has something to do with archive not working at all but i'm just trying to give as much as details as possible.
- I'm using ActiveMQ version 5.15.0
- I could not find any related issue reported already on SO and in AMQ forum.
Any help is much appreciated.
Comment: what was the solution?

Comment: Indeed, messages are sent and consumed fully.  And I have noticed that the archive operation did work today once and stopped working after that. Tired of this, I have already built the custom solution to archive messages which is working as I desired.

Comment: I build a custom solution by logging message body to separate log file which is essentially the same as the archive files written by KahaDB.

Comment: Are there messages being sent and consumed from the broker when you are observing this?



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 4, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2017:00:12/19/17', 'FavoriteCount': 0.0, 'PostTypeId': 1, 'Tags': '<activemq><kahadb>', 'Title': 'ActiveMQ KahaDB archive data logs does not work', 'ViewCount': 547, 'id': 47883419, 'user_AboutMe': '<p>Software developer by Day and a busy father by Night.</p>\n', 'user_AccountId': 5346716.0, 'user_DisplayName': 'ssasi', 'user_Reputation': 1542.0, 'user_Views': 142.0, 'user_id': 4262073.0}}