ప్రతి team ఒక notification type + recipient తో call చేసే ఒకే service ను నిర్మించండి, మరియు channel, template, user preferences, మరియు priority ను resolve చేయడాన్ని ఆ service కి వదిలేయండి. కీలకమైన design కదలిక priority lanes — ఒక OTP 2M-user marketing blast వెనుక వేచి ఉండలేదు.
ఆర్కిటెక్చర్
Services ─▶ Notify API ─▶ [validate + enrich] ─▶ Kafka topics
├─ otp/txn (high lane)
└─ marketing (bulk lane)
│
┌──── Dispatcher (per lane) ────┐
│ prefs check ─▶ template render │
└────┬──────┬──────┬────────────┘
Push Email SMS In-App
(provider adapters + rate limit)
