Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Was going through the streaming Streaming API governor limit it is 10K events. How this is calculated? Is this is the number of events that the platform generates?

Well to verify this created a vf page and recorded all the events for all the push topics. But somehow the usage and event recorded is not matching. I am observing 80+ usage for every event recorded by vf page.

Any idea how they are calculated?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

We had the exact same issue and it ultimately led to us bailing on the streaming API and using a very simple variable-frequency polling mechanism instead. In our case we were subscribing to the push topic in our VF pages on complete and unsubscribing on unload. I could actually see these unsubscribe calls completing successfully in a JavaScript debugger, but according to support the system was still charging us for an ever-growing set of subscribers. And that's the key point...evidently you get charged for #events x #subscribers, not just #events.

Here's the relevant extract from a Partner Portal support case that went on about this topic for a LONG time:

I have been working through this and was able to reproduce the behavior in an internal environment and came to the realization that the particular limit tracking appears to be: Matching DmlEvent X number of subscribers.

I have been assuming all along that the limit is in fact just the Matching DmlEvent event. The current behavior says the limit tracking is otherwise.

In your case, I believe that the probable reason for the increased multiplier even when just testing via the vf page, is that on refresh, close etc.. the unsubscribe code you have is not completing/running properly.

I will have to check with R&D on exactly how that limit is supposed to be tracked/calculated. From there, we should know exactly where to focus.

and then in the next exchange:

I received confirmation that the limit is calculated based on [Matching DmlEvent X number of subscribers].

So evidently the stream API limit "Maximum number of events per day (24–hour period)" is more accurately defined as "Maximum number of subscriber-directed events per day (24-hour period)".

share|improve this answer
    
Very useful insight Scott, thanks for sharing. Feel free to post your Case Number also for future reference. –  user320 Mar 17 at 21:48

Yes, it is the number of events that the server creates based on the PushTopic(s) that you define on the platform.

In the Streaming API, an event is defined as:

Event: Either the creation of a record or the update of a record. Each event may trigger a notification.

The governor limit is currently 1,000 for free organizations; 10,000 for all other organizations.

For more information on the streaming API, I recommend checking out the Force.com Streaming API Developer Guide.

share|improve this answer
    
@Avidev9 Hi, we have the same problem, we are updating only one record, and the API events increase about 90, or 80. Could you fix it or know why it is happening it? thanks –  user2317 Jan 30 '13 at 13:42
    
@Sergio we are still fighting with this. I am facing the exactly same issue. With every event usage increases by 80-90 –  Avidev9 May 4 '13 at 16:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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