function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rolf StrathewerdRolf Strathewerd 

Limit on high-volume events on the Streaming API too low

We recently started development with high-volume events on the Streaming API on a partial copy sandbox

After very few events we get after this request
{
clientId=4r31ek1ohkbxa8aw1me5i8j9li28t
, channel=/meta/subscribe
, id=2,
subscription=/event/NotifyMDM__e
, error=403::Organization total events daily limit exceeded
, successful=false
}

this response

com.salesforce.emp.connector.CannotSubscribe: Unable to subscribe to [/event/NotifyMDM__e:-2] [https://11880--uat.my.salesforce.com/cometd/43.0] : 403::Organization total events daily limit exceeded



If we look at MonthlyPlatformEventsUsageEntitlement, we get Max: 750000 and Remaining: 750000.

Why exceeds the usage limit so fast and where can I see a valid usage measurement?
SwethaSwetha (Salesforce Developers) 
HI Rolf,
Please see How to monitor Platform Events consumption? (https://salesforce.stackexchange.com/questions/224502/how-to-monitor-platform-events-consumption)

The easiest way for monitoring would be to run the /services/data/v47.0/limits at a regular interval (every day, every hour, or every 15 mins. etc...) which will give the running usage for the month in the MonthlyPlatformEvent result:
 
“MonthlyPlatformEvents” : {
    “Max” : 300300000,
    “Remaining” : 300299997
  }
 
If you subtract the current remaining value from the previous remaining value, you will see how many events you have used in that time period.

https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_event_limits.htm

Happy to answer any follow up queries
Rolf StrathewerdRolf Strathewerd
I got

"MonthlyPlatformEvents" : { "Max" : 750000, "Remaining" : 750000 }, ...

and

403::Organization total events daily limit exceeded

I do not expect this behaviour on Remaining > 0
SwethaSwetha (Salesforce Developers) 
HI Rolf,
The issue you are facing might be related to https://success.salesforce.com/issues_view?id=a1p3A000001YnbpQAC&title=rest-api-call-to-dailydurablegenericstreamingapievents-returns-incorrect-value . Thanks