• Vaclav Carnogursky
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi Everyone,

I am using the code sample provided Java client for Streaming API in the below link
http://www.salesforce.com/developer/docs/api_streaming/Content/code_sample_java_add_source.htm

I am not able to understand why the channel is getting disconnected after sometime. Is there a way to keep the channel alive? I have a requirement where i dont want to miss out on any of the events in salesforce. And disconnection will certainly lead to data loss.

Below are the logs that appear whenever channel is getting disconnected.

[CHANNEL:META_CONNECT]: {"id":"133048","successful":true,"channel":"/meta/connect","clientId":"1zro8qr2rfbesar24zjqa3okgvv"}
[CHANNEL:META_DISCONNECT]: {"successful":true,"channel":"/meta/disconnect","clientId":"1zro8qr2rfbesar24zjqa3okgvv"}
[CHANNEL:META_CONNECT]: {"id":"133049","successful":true,"channel":"/meta/connect","clientId":"1zro8qr2rfbesar24zjqa3okgvv"}
[CHANNEL:META_CONNECT]: {"id":"133050","error":"403::Unknown client","successful":false,"advice":{"interval":500,"reconnect":"handshake"},"channel":"/meta/connect","clientId":"1zro8qr2rfbesar24zjqa3okgvv"}
Error during CONNECT: 403::Unknown client
Exiting...

An early response on this would be highly appreciated.

Thanks,
Shalindra