For failure messages, there is a cleanup job that runs everyday at 3AM UTC. By default, it removes messages older than 180 days.
The expiration time and timing of the cleanup job can be overridden via the system.yaml file:
server: failedMessagesExpiryDays: 180 deleteOutdatedFailedMessagesSchedule: "0 3 * * *" ## Run cleanup job every day 3 AM