feat(listener): add notification retry queue with exponential backoff - #54
Merged
Abd-Standard merged 1 commit intoJun 18, 2026
Merged
Conversation
Implements a retry queue for failed Discord notifications to improve reliability during temporary network failures. Failed notifications are automatically retried with exponential backoff (base * 2^attempt) and dropped after a configurable max retry limit with an error log. Fixes syntax error in discord-notification.ts (malformed logger call). Configurable via RETRY_BASE_DELAY_MS and RETRY_MAX_RETRIES env vars.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: feat(listener): Add notification retry queue with exponential backoff
Branch:
feature/notification-retry-queue→mainCloses #25
Summary
NotificationRetryQueueservice (listener/src/services/notification-retry-queue.ts) — manages a queue of failed Discord notifications, processes due items on a configurable interval, retries them with exponential backoff, and permanently marks notifications as failed after the max retry limit is reached.EventSubscriber— whendiscordService.sendEventNotification()returnsfalse, the event is enqueued for retry instead of silently dropped.RETRY_BASE_DELAY_MS(default5000) andRETRY_MAX_RETRIES(default5).discord-notification.ts— a malformedlogger.infocall with a missing closing brace.Retry behaviour
Attempt | Delay from previous failure -- | -- 1 | baseDelayMs × 2⁰ = 5s 2 | baseDelayMs × 2¹ = 10s 3 | baseDelayMs × 2² = 20s … | … max | logged as permanently failedTest plan
npm test— 88/88 tests pass across all suitesevent-subscriber,discord-notification, or other existing suites