function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Srihari Nama Ananda KumarSrihari Nama Ananda Kumar 

Salesforce Streaming API gets disconnected after few hours

We are using Salesforce Streaming API to receive events based on Push topics and for platform events. Initially at subscription Streaming API works fine listening and delivering events. However after a period of around 12-24 Hours the channel gets disconnected. At this point the last incoming message from salesforce was :

{ channel: '/meta/disconnect' }
{ clientId: '5rw1bxn4jzyed3vhbcjnpkwb2fsd',
advice: { interval: 0, reconnect: 'none' },
channel: '/meta/connect',
id: 'k1',
error: '403::Unknown client',
successful: false }

With this error the underlying Faye client believes there should not be any reconnection and stops listening to channel (No more connection handshake). From the documentation we understand the reliability of message due to load, but complete disconnection is unexpected.

Background : We are using Node JS npm module for working with Streaming APIs. We were using Salesforce API version 34 earlier, later with the need to support Platform Events we planed to use the API versions 37 and above(41). However only with new apiversion we are seeing this disconnection whereas the earlier 34 version is still working fine. Also with version 34 many events were not generated due to unsupported fields like address etc.
Richa williamsRicha williams
hai srihari,
Can u explain me detail about the which u are telling about Salesforce Streaming API.
Richawilliams (