Notification Service
Orchestrates notification creation, routing, and delivery across multiple channels
Overview
The Notification Service is the central orchestrator for all notifications, handling creation, preference evaluation, batching, and routing to appropriate delivery channels.
Key Responsibilities
Notification Processing
- Listen to domain events (TaskAssigned, CommentAdded, etc.)
- Evaluate user notification preferences
- Determine notification priority and urgency
- Apply batching rules for digest notifications
- Route to appropriate delivery channels
Preference Management
- Store user notification preferences
- Handle muting and quiet hours
- Manage channel-specific settings
- Process unsubscribe requests
Delivery Orchestration
- Queue notifications for delivery
- Coordinate with Email and Push services
- Track delivery status
- Handle delivery failures and retries
Technical Details
Technology Stack:
- Runtime: Node.js 20
- Framework: NestJS
- Database: PostgreSQL (preferences, delivery log)
- Queue: AWS SQS (notification queue)
- Cache: Redis (user preferences)
- Message Broker: Apache Kafka
SLA:
- Availability: 99.95%
- Notification Latency: < 5 seconds for immediate
- Email Delivery: < 30 seconds
- Batch Processing: Every 15 minutes
Notification Rules Engine
- Rule-based evaluation of events
- User preference matching
- Intelligent batching algorithms
- Priority escalation logic
Integration Points
- Email Service: Send email notifications
- Push Service: Send mobile/web push
- Slack/Teams: External integrations
- Analytics: Track notification metrics