Skip to content

feat(realtime)!: persist broadcast messages for replay - #2180

Merged
spydon merged 3 commits into
mainfrom
lukasklingsbo/sdk-2679-supabase-flutter-persist-option-on
Nov 17, 2026
Merged

spydon merged 3 commits into
mainfrom
lukasklingsbo/sdk-2679-supabase-flutter-persist-option-on

Conversation

@spydon

@spydon spydon commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Adds a persist option to broadcasts so private channels can store messages for replay. Closes SDK-2679.

  • persist: BroadcastPersistence(expiresIn: ...) on sendBroadcastMessage, sendBinaryBroadcastMessage, httpSend and httpSendBinary. Over the websocket it goes in the frame metadata, over HTTP in the query string.
  • Throws a RealtimeException without sending anything on a public channel, or with v2BroadcastCompatibility.
  • With ack, the new ChannelResponse.persistenceUnauthorized, persistenceFailed and persistenceInvalidExpiry report a message that was not stored. Breaking for exhaustive switches over ChannelResponse.
  • MockRealtimeTransport decodes JSON binary pushes and adds rejectNextBroadcast.
  • Matrix: realtime.channel.broadcast_persist is implemented. Reference: feat(realtime): broadcast persistence supabase-js#2690.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9f49bc2 and 4e070be.

Files selected for processing: 11

  • packages/supabase_realtime/lib/src/realtime_channel.dart
  • packages/supabase_realtime/lib/src/serializer.dart
  • packages/supabase_realtime/lib/src/types.dart
  • packages/supabase_realtime/test/broadcast_persist_test.dart
  • packages/supabase_realtime/test/channel_test.dart
  • packages/supabase_realtime/test/realtime_integration_test.dart
  • packages/supabase_realtime/test/serializer_test.dart
  • packages/supabase_realtime/test/utils/realtime_test_utils.dart
  • packages/supabase_test/lib/src/mock_realtime_transport.dart
  • packages/supabase_test/test/mock_realtime_transport_test.dart
  • sdk-compliance.yaml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@spydon
spydon merged commit 97d8b4b into main Nov 17, 2026
58 of 59 checks passed
@spydon
spydon deleted the lukasklingsbo/sdk-2679-supabase-flutter-persist-option-on branch November 17, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant