Menu

Node.js Fintech Queue: Publish Per Waiter or Whole Queue Snapshots
📰

Node.js Fintech Queue: Publish Per Waiter or Whole Queue Snapshots

DEV Community: node·MalachiNilsson7591·11 days ago
#hcAvk06h
#devtonodejs#devto#dev#queue#realtime
Reading 0:00
15s threshold

TL;DR: Publish one whole-queue snapshot when every authorized viewer may see the same fintech waiting room. Publish one scoped message per waiter when a position must remain private. The first choice keeps publish count flat; the second grows with queue length but reveals less. In both designs, a reconnect should fetch current state rather than replay old position messages.

Choice Publishes per update Client visibility Best fit

Whole queue 1 Every authorized subscriber receives the snapshot Shared customer queue display

Per waiter N for N waiters Each subscriber receives only its own state Private account or support position

For a small SaaS, I would start with a whole snapshot only when the token and channel scope make that snapshot safe for every subscriber. I would switch to per-waiter fan-out the moment the payload contains another customer's identity, position, or account context.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.