WebSocket Channel Subscriptions - Dropped Events After Reconnect

We’re on Genesys Cloud, notification_api, using the WebSocket channel subscription for conversation events - specifically conversations.v2.detail. Been battling the baked-in reconnection issues again. It seems like after a standard WebSocket disconnect/reconnect (which is a whole separate headache, seriously, the retry logic is… something), we’re dropping events for a period - typically around 10-20 seconds.

First tried increasing the heartbeat interval to 15s, no change. Then implemented a more aggressive reconnection strategy - just yeet this into prod, see what happens - still losing events. The logs show a successful reconnection, a new READY event, but then nothing until the existing conversation state is re-published.

Here’s the initial WebSocket handshake - standard stuff.

GET /api/v2/channels/websockets HTTP/1.1
Host: genesyscloud.com
Connection: Upgrade
Sec-WebSocket-Version: 13
Sec-WebSocket-Key: dGhlIHJlYWxseSBjb29sIGtub2NrcyB3ZWIgc29ja2V0cw==
Upgrade: websocket

The expected behavior is that events should continue flowing after reconnect. Is the event stream not reliably buffering during a disconnection, or is something else completely broken? This happens in both dev and staging. It’s not a client-side issue, I’m pretty sure.

PlatformClientV2 handles the subscription state by buffering events internally during a reconnect - think of it like a temporary holding pen. The default buffer is small. Increase the maxEventBuffer property to, say, 60, via the subscription options.

{
 "channels": ["conversations.v2.detail"],
 "maxEventBuffer": 60
}

10-20s sounds like the buffer clearing.