Back to gallery
Pub/sub channel
A two-pane live chat over a named channel.
Live
realtime.publish + RealtimeClient.subscribe channel
demo:pubsub:lobbyTwo independent WebSocket clients. Type in one — it appears in the other, live.
Aqua
…No messages yet — say something.
Violet
…No messages yet — say something.
Realtime bus
No output yet — run the demo above.
Both panes hold their own RealtimeClient and subscribe to the
same channel. A publish from either pane — or from the edge via realtime.publish — is delivered to every subscriber over the
same-origin /_rt/ws socket. Messages you sent align right;
everything else aligns left.