222 Reports
Pub/Sub API consumes DailyDeliveredPlatformEvents in excess of the actual number of deliveries
Created
Found in Release
Spring '24
Last Updated
Reference ID
W-15085889
Summary
When using the Pub/Sub API, the number of delivered events (DailyDeliveredPlatformEvents) being used are more than what is expected, occasionally.
Steps to Reproduce
1. Set up a publish event as an example:
1-1. Create a custom object:
* Label: cdc
* Plural Label: cdcs
* Object Name: cdc
1-2. Enable Change Data Capture for cdc__c.
2. Create publish events like this:
---
List<cdc__c> ccs = new List<cdc__c>();
for (Integer i=0; i<10000; i++) {
cdc__c cc = new cdc__c();
cc.Name = 'test_' + i;
ccs.add(cc);
}
Insert ccs;
---
3. Subscribe events using a subscriber's client.
ex) https://developer.salesforce.com/docs/platform/pub-sub-api/guide/quick-start.html
4. Run the following Apex code from Developer Console.
---
List<System.OrgLimit> limits = OrgLimits.getAll();
for (System.OrgLimit aLimit: limits) {
If(aLimit.getName() == 'DailyDeliveredPlatformEvents') {
System.debug('Limit: ' + aLimit.getName());
System.debug('Max Limit is: ' + aLimit.getLimit());
System.debug('Usage Value is: ' + aLimit.getValue());
}
}
---
5. Check the DailyDeliveredPlatformEvents usage from the debug log.
-> You may see the value is more than 10,000.
Workaround
None
222 Reports