The server keeps connections alive with a heartbeat the client must answer.1.
Server probe — every 15 seconds the server sends a heartbeat message carrying the current epoch-millisecond timestamp:{ "type": "M", "topic": "heartbeat", "data": 1736696400000 }
The first heartbeat arrives about 15 seconds after the connection opens. 2.
Client response — before the next probe (within ~15 seconds), the client must echo the exact timestamp back:{ "method": "heartbeat", "data": 1736696400000 }
The heartbeat response has no requestId and no params. The data value must match the timestamp from the most recent server probe. A missing, stale, or mismatched value is treated as no response, and the server closes the connection on the next probe.Clients should reconnect with backoff and re-subscribe to their topics after any disconnect. Modified at 2026-06-18 15:44:19