Notifications service workflow overview
Workflow overview
The notification service receives a request to create a notification, the service processes the request and places it in a AWS SQS.
Message processing
A worker periodically requests notifications from the AWS SQS queue in batches of up to 10 messages.
The worker handler fetches data needed to send out the notification, the template from Contentful and user specific information and tokens from the user profile service. Then proceeds to send the notification to the appropriate channel (e.g., push notification via Firebase Cloud Messaging, or email).
Error Handling and Retries
Retry Logic: If a message fails during processing, the system automatically retries up to three times.
Dead Letter Queue (DLQ): If a message fails after the maximum number of retries, it is moved to a Dead Letter Queue. Messages in the DLQ are not processed automatically and require manual intervention to reprocess.
Debugging and monitoring
Message Tracking: Each message is assigned a unique
messageId
, which can be used to trace its lifecycle within the system.Logging: Logs for message processing are available in Datadog.
Last updated
Was this helpful?