How to monitor Salesforce Change Data Capture Events daily or 24-hour or hourly period usage?

How to monitor Salesforce Change Data Capture Events daily or 24-hour or hourly period usage?

The maximum number of delivered Change Data Capture event notifications in the last 24 hours or daily, shared by all the clients is 50000. Clients include CometD, Pub/Sub API, and the empApi Lightning component only.

Reference Article:

https://developer.salesforce.com/docs/atlas.en-us.change_data_capture.meta/change_data_capture/cdc_allocations.htm

To check or monitor the usage, use the following queries:

SOQLs:

Delivered Events:

SELECT Name, StartDate, EndDate, Value 
FROM PlatformEventUsageMetric 
WHERE Name='CHANGE_EVENTS_DELIVERED' 
AND StartDate>=2022-08-31T00:00:00.000Z AND EndDate<=2022-09-01T00:00:00.000Z

The above query will return Change Data Capture events delivered on 31st August 2022.

Published Events:

SELECT Name, StartDate, EndDate, Value 
FROM PlatformEventUsageMetric 
WHERE Name='CHANGE_EVENTS_PUBLISHED' 
AND StartDate>=2022-09-01T00:00:00.000Z AND EndDate<=2022-09-02T00:00:00.000Z

The above query will return Change Data Capture events published on 1st September 2022.

Note:

Timings in the queries are GMT/UTC

Leave a Reply