interface RealtimeFrame
Since 0.2.0

One broadcast crossing the backplane.

Every field is JSON-serializable, because the transports agree on nothing richer: a message broker hands the payload to a serializer, and Redis pub/sub carries strings.

Properties

readonly
kind: RealtimeFrameKind

Which consumer the frame belongs to.

readonly
origin: string

The publishing instance's identity.

A subscriber drops frames carrying its own origin. Without this a two-node cluster would echo every broadcast back and forth forever.

readonly
name: string

The room or channel name the frame addresses.

readonly
data: string

The payload, always a string.

A WebSocket binary frame is base64-encoded and flagged by RealtimeFrame.binary; an SSE message is its JSON encoding.

readonly
optional
binary: boolean

True when RealtimeFrame.data is base64-encoded binary.

Since 0.2.0
readonly
optional
exceptId: string

The connection excluded from this broadcast, by ID.

RoomBroadcastOptions.except names a live connection object, which has no meaning in another process — but connection IDs come from runtime.uuid() and are therefore globally unique, so carrying the ID is what lets the exclusion survive the wire. A receiving replica skips the member whose id matches; ordinarily none does, since the excluded peer is connected to the originating replica.

Absent for SSE channels, whose publish has no exclusion option.

Usage

import { type RealtimeFrame } from "realtime-backplane-plugin/src/index.ts";