received: {"topicName": "channel.metadata", "eventBody": {"message": "WebSocket Heartbeat"}}
I get websocket heartbeat even a call got ended that I used notification API to get transcripts via websocket
and i have subscribed to v2.conversations.${ callId }.transcription to get transcriptions
Hi Varun,
Remember that web socket is our underly transport protocol for messages from Genesys Cloud to your application. We place the concept of a channel on top of a websocket and you can subscribe to multiple topics on a channel and can have a maximum of 20 channels per websocket.
So even though you might have subscribed to a topic and have received v2.conversations.${ callId }.transcription message indicating that the call ended, the web socket channel will still stay open and you will still get heartbeat notifications.
It is your responsibility as a developer to close the channel even if you have received the message you are waiting for (e.g. call disconnected). I suggest you review the notifications for the limits and durations around a web socket.
Here are some of the important pieces:
Usage limitations
Note the following usage limitations for channels and topics.
- Channels remain active for 24 hours. To maintain a channel for longer than 24 hours, resubscribe to topics.
- You can create up to 20 channels per user and application. When the channel limit is reached, then the new
channel replaces the oldest channel that does not have an active connection.
- Each WebSocket connection is limited to 1,000 topics. If you subscribe to more than 1,000 topics, then the
notification service returns a 400 error code.
- Each channel can only be used by one WebSocket at a time. If you connect a second WebSocket with the same
channel ID, the first WebSocket disconnects.
- Guests cannot subscribe or unsubscribe to topics over WebSockets.
I hope that helps.
Thanks,
John Carnell
Director, Developer Engagement
Hi Varun,
In our case, we open, close, and resubscribe to the websocket topics every 12 hours. It worked, but I encourage you to check if the required topic is available for the EventBridge notifications system. EventBridge is reliable and it doesn't required a renewing process.
David.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.