Legacy Dev Forum Posts

 View Only

Sign Up

Check if Purecloud WebSocket is alive

  • 1.  Check if Purecloud WebSocket is alive

    Posted 06-05-2025 18:05

    fcatinocluster | 2018-11-28 14:49:44 UTC | #1

    Hi all, I have a trouble detecting if Purecloud Websocket connection is alive or not. I'm using

    NotificationHandler.WebSocket.OnClose

    handler and NotificationHandler.WebSocket.IsAlive in order to check every 10 minutes if the connection is alive. I'm using ping-pong messages on the websockets but sometimes I can't receive other kind of message from topics that I've subscribed.

    Is there a better way in order to detect when the connection and the supscriptions to topics dies?

    P.S. I'm resubscribing to topics every 12 hours.

    Thanks in advantage.

    Greetings.


    tim.smith | 2018-11-28 18:36:25 UTC | #2

    The ping-pong messages (documented as WebSocket Health Check will tell you if the socket is connected or not. If you don't receive a pong response, the socket is no longer connected.

    You can verify which topics are subscribed to via GET /api/v2/notifications/channels/{channelId}/subscriptions.

    If your socket is connected and you are subscribed to the correct topic and are missing some notifications, please open a case with PureCloud Care to investigate; missing data cannot be investigated on the forum.


    fcatinocluster | 2018-11-29 08:45:52 UTC | #3

    Hi Tim, in some cases, pong responses arrived but no activity from topics. I had to reboot my application in order to subscribe again to topics.

    Greetings


    tim.smith | 2018-11-30 14:57:00 UTC | #4

    That's an issue that needs to be worked through PureCloud Care.


    system | 2018-12-31 14:57:00 UTC | #5

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


    This post was migrated from the old Developer Forum.

    ref: 4058