How to purge data from a messaging server

Once the absorbed data reaches a certain age, you should erase it to save disk space.

In the default configuration of a messaging server, data is deleted from disk 7 days after its absorption. This operation is performed on a group of 1 GB of data at a time.

To change the data retention period, update log.retention.hours in conf/messaging-server/platform.properties. The granularity is controlled by log.segment.bytes in the same file.

To change the frequency with which the messaging server checks whether a cleanup is needed – once every 5 minutes by default – adjust log.retention.check.interval.ms in conf/messaging-server/platform.properties.

Example
############################# Log Retention Policy #############################
# The minimum age of a log file to be eligible for deletion
log.retention.hours=168
log.segment.bytes=1073741824
# The interval at which log segments are checked to see if they can be deleted according to the retention policies
log.retention.check.interval.ms=300000

Related Links