Notification Delivery and Maintenance
Email delivery attempts and scheduled platform maintenance.
Runtime Scenario
Notification delivers transactional email commands independently of order state, while Scheduler initiates recurring catalog and liveness work. Kafka redelivery and external SMTP acceptance are distinct reliability boundaries.
Purpose & Trigger
The flow sends order email when Finance publishes a command and executes platform maintenance on schedule. Email and scheduled work are independent processes.
Visual References
Transactional Email Delivery
Loading graph...
Scheduled Platform Maintenance
Loading graph...
Step-by-Step Walkthrough
- Finance publishes an order email command asynchronously and associates it with the order.
- Kafka delivers the command to Notification. Notification claims a 24-hour idempotency key before processing.
- A duplicate event identifier exits without rendering or sending email.
- For a new identifier with a usable recipient, Notification renders the email and submits it through the protected SMTP path.
- The SMTP relay’s acceptance is a handoff result, not proof of mailbox delivery.
- Scheduler persists scheduled jobs and starts them independently on their cron intervals.
- The catalog batch job publishes an asynchronous trigger for Catalog Ingestion.
- The heartbeat job records liveness independently of email delivery.
Error Handling & Edge Cases
- Missing recipient addresses skip rendering and delivery.
- SMTP failures retry within a bounded resilience policy and release idempotency after an exhausted attempt.
- Kafka retries then route exhausted commands to the notification dead-letter queue.
- A newly reissued command with a new identifier may create a duplicate because broker delivery and Finance reissue semantics differ.
- Scheduler failure and email worker failure are observed independently.
Quality & Consistency Notes
- Email delivery is at-least-once when failures or broker redeliveries occur.
- The idempotency key prevents exact redelivery duplicates for 24 hours.
- Scheduled work and inbox delivery may be healthy while search freshness or mailbox delivery is degraded.