The Streaming API is working in Production, yet some times it does not work. could we be reaching the Streaming API LIMITATIONS ?

Or could there be another area that I should investigate in using the Streaming API?


The Salesforce Steaming API does have limitations, it is also does not have guarantee reliability of messages, as per the documentation...

Streaming API doesn’t guarantee durability and reliable delivery of notifications. Streaming servers don’t maintain any client state and don’t keep track of what’s delivered. The client may not receive messages for a variety of reasons, including:

  • When a client first subscribes or reconnects, it doesn’t receive messages that were processed while it wasn’t subscribed to the channel.

  • If a client disconnects and starts a new handshake, it may be working with a different application server, so it receives only new messages from that point on.

  • Some events may be dropped if the system is being heavily used.

  • If an application server is stopped, all the messages being processed but not yet sent are lost. Any clients connected to that application server are disconnected. To receive notifications, the client must reconnect and subscribe to the topic channel.

Alternative to the Streaming API?

Depending on how realtime you need the information, you might want to consider the information the Data Replication API gives you, for a given period of time, it returns updates and delations made to a give object when called. It has no gaps or reliability issues, so long as you obey the rules around how often you call the methods to retrieve the data. You can call it via the Salesforce SOAP API and natively from Apex here and here.

  • My experience with Streaming API is that it is not 100% reliable, at least on the NA26 cluster where we have it running. We use it to generate notifications on new Leads and of the 200-300 we get daily, we see about 99% reliability, so we have an outside batch job that runs hourly to pick up any that were missed. – AlwaysThinkin Nov 10 '15 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.