There are methods on the management API to delete messages. Take a look on the JMX Console.
thanks for the hint. The API is not the problem though.
We are deleting messages via management API but we are wondering how we can tell HornetQ to clean up the journal files (i.e. free disk storage that is no longer needed).
Is there a way to trigger a "clean up" or "defragmentation" of the journal files?
Thanks & Regards,
1 of 1 people found this helpful
The journal should clean up itself based on the deletes. If you set min-files to 10 for instance you will always have 10 files. (The journal will pre-allocate files).
Eventually due to a chain of adds and deletes the journal may have more files (if you have data surviving) and compacting will take care of that. So, as soon as you delete the messages (or ack the messages) the journal should cleanup itself.
Take a look on the PrintData output if you still see stuff not being deleted from the journal.