Accept notification events at an API -> persist notification state & check user preferences/quiet hours -> fan out by channel into separate priority queues (OTP high-priority vs marketing low-priority) -> channel workers call SendGrid/APNs/FCM with idempotency keys, exponential backoff, DLQ, and template rendering.
Follow-up Interview Question · Why should transactional OTP emails and bulk marketing digests never share the same queue?