I have my .NET client (windows service) which subscribes to Salesforce streaming API push topics.
I am able to connect to Salesforce and can get the notifications to my client. Everything is working fine, but:
When there is no activity on the channel (no changes for Salesforce object) after some time (maybe 2 hours) if I update the object, I am not receiving any notification from Salesforce.
I had tried putting listeners to log and in the logs it says below
{"clientId":"f6xo67iet55w5j7ek6ldw72nfc6","channel":"/meta/connect","id":"82","successful":true} 5/15/2018 8:12:28 PM
{"advice":{"interval":0,"reconnect":"handshake"},"channel":"/meta/connect","id":"83","error":"403::Unknown client","successful":false} 5/15/2018 8:12:28 PM
{"clientId":"hbx1v2cxebbeder11s99dqkxmasre","advice":{"interval":0,"timeout":110000,"reconnect":"retry"},"channel":"/meta/connect","id":"85","successful":true} 5/15/2018 8:12:29 PM
{"clientId":"hbx1v2cxebbeder11s99dqkxmasre","channel":"/meta/connect","id":"86","successful":true} 5/15/2018 8:14:20 PM
{"clientId":"hbx1v2cxebbeder11s99dqkxmasre","channel":"/meta/connect","id":"87","successful":true} 5/15/2018 8:16:10 PM
so as per the log, sometimes I get "403::Unknown client" but immediately after that it says again channel successful.
But as I said when I try updating the Salesforce object after 2 hours (as per log, it is in connection successful) I am not receiving any notification.
If I restart my windows service and gets the notification again.
In my client I am using cometd from - https://github.com/couchand/CometD.NET/tree/headers and for push topics subscription I am using this - https://github.com/foluis/Salesforce_PushTopics
Any help would be greatly appreciated.
Ok finally I could able to get this working. Below are the changes