Skip to content

STREAM-1362: Retry notification subscription#351

Open
AidanWZ wants to merge 6 commits into
developfrom
STREAM-1362
Open

STREAM-1362: Retry notification subscription#351
AidanWZ wants to merge 6 commits into
developfrom
STREAM-1362

Conversation

@AidanWZ
Copy link
Copy Markdown
Collaborator

@AidanWZ AidanWZ commented May 4, 2026

Retry on ECONNRESET: Switched from requestApi to requestApiWithRetry with maxAttempts: 3 and a 2-second retry interval.

Track topic list change: Track the pending retry via pendingBulkSubscribeRetry. When a new makeBulkSubscribeRequest is issued (because the debounce fired again with an updated topic list), the old retry is cancelled. The cancelled bulkSubscribe returns 'Unknown' state for its topics rather than throwing, since the superseding request will carry the correct desired state.

This prevents:
A stale PUT from overwriting the server with an outdated topic list
Unnecessary duplicate requests when the topic list has already changed
Missed subscriptions that were added between retry attempts

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 4, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@AidanWZ AidanWZ marked this pull request as ready for review May 26, 2026 18:31
@AidanWZ AidanWZ self-assigned this May 26, 2026
@AidanWZ AidanWZ added the enhancement Improvement of an existing feature. label May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement of an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants