Socket.subscribe records subscriptions only on ack, narrowing offline replay
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- api, networking
Research direction
Read Socket.subscribe, subscribeAll, and rememberSubscription to understand the acknowledged-versus-optimistic recording paths described here. The issue records a deliberate narrowing rather than requesting a code change; completion would require preserving that behavior and keeping the separate rejection change out of scope.
Written by the indexing model from the issue text.
Description
Subscription recording moved from optimistic pre-send to ack-only. A subscribe that never reaches
the server therefore leaves no record at all, so subscribeAll has nothing to replay for it.
Previously the subscription was written to this.subscriptions before the send, so a subscribe
that failed in flight was still replayable on reconnect. Now the record is written only once the
server acknowledges.
Offline is the case where this bites: the errors raised when there is no connection are sorted into
neither branch of subscribe, and rememberSubscription returns early when there is no
connection, so nothing is recorded and nothing can be replayed.
Why this is being accepted rather than reverted
Ack-only recording is the more accurate record — optimistic recording writes down subscriptions
that may never exist server-side. The consuming application is being changed to re-subscribe its
own streams on reconnect, which removes the need for replay coverage of never-acknowledged
subscriptions.
This issue exists so the narrowing is on record as a deliberate change rather than an unexplained
behavioural difference.
Related
Socket.subscribe also ends in a terminal .catch returning undefined, so callers have no
failure signal at all. That is being addressed separately by making subscribe reject.
- Dominant language
- TypeScript
- Stars
- 146
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RocketChat/Rocket.Chat.js.SDK
-
refactor: delete the unused replaceLog and silence exports from lib/log.tsPossibly taken @ayushi-wq claimed this 81 days ago. Openbug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
RocketChat/Rocket.Chat.js.SDK#380 · 1 comment ·
-
refactor: delete the unassigned messages and joinedIds fields on DriverPossibly taken @arbazkhan971 claimed this 68 days ago. Openbug ready-for-agent
Difficulty 1/5 Under an hour Newbie friendliness 90/100
RocketChat/Rocket.Chat.js.SDK#379 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
RocketChat/Rocket.Chat.js.SDK#308 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
RocketChat/Rocket.Chat.js.SDK#306 ·
-
bug
Difficulty 2/5 Half a day Newbie friendliness 78/100
RocketChat/Rocket.Chat.js.SDK#254 ·
All issues in RocketChat/Rocket.Chat.js.SDK
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
langchain-ai/langchainjs#12239 ·
Maintainers usually reply within 1 day
-
Board view: the Monitoring column is always empty because compact issue rows drop displayStatusOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
paperclipai/paperclip#21837 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
code-yeongyu/senpi#6813 ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 93/100
lingdojo/kana-dojo#34169 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100