Clean Up Sent Email (v1.0.0)
Receive a message to trigger cleanup of sent emails for system maintenance
Overview
The CleanUpSentEmailIntegrationEvent
is triggered by the Scheduler Service to initiate the cleanup process for sent emails in the notification system. This event is published daily at midnight to maintain system performance and storage efficiency by removing processed email records from the outbox.
Event Flow
- Scheduler Service publishes the event daily at midnight (cron:
0 0 * * *
) - Notification Service receives the event and processes it
- System identifies and removes successfully sent email records from the outbox
- Storage space is freed up and system performance is maintained
Business Value
- System Performance: Prevents database bloat by regularly cleaning up processed records
- Storage Optimization: Reduces storage costs by removing unnecessary data
- Data Hygiene: Maintains clean data architecture and improves query performance