Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

How delivery works

At a high level:

  1. Writer connects (WebSocket or gRPC), sends a message with tenant and channel name and a payload.
  2. The service routes the message to all listeners currently subscribed to that tenant and channel (or to a pattern that matches it).
  3. Listeners receive the message on the same channel (tenant + channel name).

You do not need to know how the service is built internally. You connect to an endpoint, send your token, and publish or subscribe by tenant and channel. The service takes care of routing and fanout.

If you need the exact contract (drops, duplicates, ordering, backpressure), see Delivery semantics.

Online-only delivery (no persistence)

FastPubSub does not store message history. Messages are delivered only to listeners that are connected and subscribed at the moment the message is published. If a listener is offline (or temporarily disconnected), it will not receive missed messages.

Why this design? This is the only architecture that achieves minimal latency between writer and listener. No disk writes, no replication acknowledgments, no durable queues — just direct in-memory routing. Every extra step (persistence, guaranteed delivery, replay) adds latency. FastPubSub trades durability for speed: if you need the lowest possible delay, this is the way.

Subscription propagation delay (join window)

Subscriptions are distributed across the FastPubSub overlay and become effective after the network learns about them. This propagation takes time and depends on geography and current network conditions:

  • A listener starts receiving messages after its subscription has propagated to the relevant routing nodes.
  • Propagation is typically much faster within the same region and slower across continents.
  • In global scenarios, expect a propagation delay on the order of hundreds of milliseconds up to ~1 second.

Practical implication: A subscription is not instantaneous on a global network. If a writer publishes immediately after a listener subscribes, the earliest messages may be missed until the subscription becomes effective across the overlay.