I need to use Salesforce Streaming API to get the real time updates on the Salesforce records. I have been exploring the EMP Connector example given in the salesforce page. I am having few doubts with respect to my client implementation.

What will happen if after receiving the message in my client, the processing is slow ?

To test this impact, I have added a sleep of 10s. However, messages are properly receiving at the interval of 10s.

What if my client can process 5 records / second, but I am receiving 10 records per second ?

Whether client slowness will have an impact in getting all the data ? Whether I need to do any special handling in my client side ?

1 Answer 1


The messages are held in a buffer on the server. As long as you retrieve the messages within 72 hours, and otherwise follow the documentation, you shouldn't miss any events. The only thing your client needs to do is to remember the last Replay ID in case of a connection timeout, which you should already be doing, since a lost connection could happen for any number of reasons. If you find your system falling further and further behind, then streaming might not be the right design choice. You either need to scale your system up or come up with an alternative arrangement, such as using the Replication API. You can read more about your choices in Data Replication Using Change Event Streams or Replication API.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .