The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: Protocol documentation for Realtime with bad heartbeat message (#39299)
Filipe Cabaçoea19e56e8a5e
diff --git a/apps/docs/content/guides/realtime/protocol.mdx b/apps/docs/content/guides/realtime/protocol.mdxindex 9708c58683a..59aa688ce6d 100644--- a/apps/docs/content/guides/realtime/protocol.mdx+++ b/apps/docs/content/guides/realtime/protocol.mdx@@ -193,6 +193,12 @@ System messages are sent by the server to inform the client about the status ofThe heartbeat message should be sent at least every 25 seconds to avoid a connection timeout. Payload should be empty object.+For heartbeat, use the topic `phoenix` as it needs to be sent to the WebSocket server itself and not to a channel:++```json+{ "topic": "phoenix", "event": "heartbeat", "payload": {}, "ref": "8" }+```+#### Payload of access_tokenUsed to setup a new token to be used by Realtime for authentication and to refresh the token to prevent the channel from closing.