Does SDK handle notifications websocket expiry?

Hello,

I saw a dev drop a while back about the Python SDK now supporting the Notifications Service that's described here: https://developer.genesys.cloud/api/rest/v2/notifications/notification_service#connect-to-the-notification-service.

A few questions I could not find answers for in the docs or forum:

  1. Does the SDK support any kind of automatic extension of the 24-hour websocket lifetime that Genesys enforces or does it have to be done manually?
  2. Documentation says the lifetime can be extended by re-subscribing to the topics. Can this be accomplished both via a REST API call and resubscription via websocket message, or just either (which)?
  3. Does the SDK support automatic rollover attempt (try to create new channel with same subscriptions), when Genesys sends the one-minute advance warning about channel going to be closed? Or does this have to be handled manually also?
  4. What about token expiry? Given the websocket connection itself does not require authentication, what does the service do to existing connections when the token used to create them expires?
  5. Presuming Genesys closes the channel when the token expires, what kind of JSON notification message is sent?
  6. Does the SDK refresh the token in this case or does it have to be done manually?
  7. How much can there be jitter in the automatic heartbeat messages sent by Genesys? Ie. how long should a client wait until sending a manual health check to see if connection is live? How long should a client wait for a response to that?

Thank you!

The purpose of the websocket interfaces in the SDKs is primarily to assist with incoming message deserialization. All of your questions above must be handled by the logic you write into your app.

I believe heartbeats are sent approximately every 30 seconds. The delay between Genesys Cloud and you can vary due to the nature of traffic over the open internet. You can send a ping whenever you like to verify the connection. Once you implement this in your app and include logging of timing information, you can establish a baseline of what kind of lag to expect based on where your app is running.

Thanks. The questions I raised are quite important for production-quality applications so I created a small Python package to make it more convenient to use the Notifications Service:

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