Stop receiving websocket events in React app - how to check WS connection health?

Hi all,

I'm using the React Typescript Blueprint app for testing.
Sometimes the events just stops reciving in the app, e.g. presence events are not arriving and not getting logged in console... while changing presence in official genesys app for same agent.
Is there any way to check if websocket connection is helthy and event subscriptions are still ok?

Thanks,
John,

Hi Northstar,

When you establish a websocket via the notification service, the websocket will send a health check heartbeat. One thing you can do is save the date/time the last heartbeat was received and then check periodically if the heartbeat is less than X amount of time old.

You can also periodically send a manual health check request. Take a look at the Genesys Cloud Notifications page for more details.

Thanks,
John Carnell
Director, Developer Engagement

Thanks for the info.
Managed to figure out that the subscriptions was missing randomly.
Executing the subscription requests in paralell using promise.all() caused the issue .
Executing them one after each other solved the problem...

It seems that rate limiting does not allow you to execute sunscriptions request parralel...

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.