Repository navigation
feat(realtime): add broadcast_persist capability and spec - #310
Conversation
Findings
|
cf1a148 to
f0a921e
Compare
7d741d6 to
8f1f2a7
Compare
spydon
left a comment
There was a problem hiding this comment.
Cool, didn't know about this feature
🤖 I have created a release *beep* *boop* --- ## [1.20.0](capability-matrix/v1.19.0...capability-matrix/v1.20.0) (2026-11-03) ### Features * **auth:** Add spec for `AuthClient.signOut()` ([#302](#302)) ([cb01912](cb01912)) * **realtime:** add broadcast_persist capability and spec ([#310](#310)) ([9a4432e](9a4432e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
Depends on supabase/realtime#2468
What
Adds
realtime.channel.broadcast_persisttocapabilities/realtime.yamland its spec atspecs/realtime/channel/broadcast_persist.md.Why
Realtime takes a per-message
persistoption that stores a broadcast inrealtime.messagesfor replay (supabase/realtime#2235). supabase/supabase-js#2690 adds it to supabase-js, and review asked for a capability and spec here first instead of a supporting symbol onrealtime.channel.broadcast.What the spec covers
persisttravels in the frame metadata over the websocket and in the query string over HTTP, never in the payload or body.ttlrange, because the server owns the maximum retention.broadcast.ack, the send resolves with the server's code:persistence_unauthorized,persistence_failedorpersistence_invalid_ttl.okwithbroadcast.ackand nothing without it. Over HTTP, it answers 422.okwithbroadcast.ackand nothing without it.For reviewers
supabase/realtime@cea1926and linked to the handler lines. The ttl error code uses its name after the rename in fix: rename invalid_persist_ttl error to persistence_invalid_ttl realtime#2479.okreply to a stored message carries itsid. The spec doesn't say whether SDKs expose it.