Newer Version Available

This content describes an older version of this product. View Latest

Change Data Capture Allocations

Concurrent Client Allocation

Description Performance and Unlimited Editions Enterprise Edition Developer Edition
Maximum number of concurrent CometD clients (subscribers) across all channels and for all event types 2,000 1,000 20

The concurrent client allocation is shared with all types of events that you can subscribe to through Streaming API, including PushTopic, generic, and platform events. A client that exceeds the concurrent client allocation receives an error and can't subscribe. When one of the clients disconnects and a connection is available, the new client can subscribe. See Streaming API Error Codes in the Streaming API Developer Guide.

Note

Default Allocations

Each Salesforce edition provides a default allocation for the number of events delivered to CometD clients. The default allocation is enforced daily to ensure fair sharing of resources in the multitenant environment and to protect the service.

The number of delivered events to external CometD clients is counted per subscribed client. If you have multiple client subscribers, your usage is added across all subscribers. For example, you have an Unlimited Edition org with a default allocation of 50,000 events in a 24-hour period. Within a few hours, 20,000 event messages are delivered to two subscribed clients. You have consumed 40,000 events, and you are still entitled to 10,000 events within the 24-hour period.

If you exceed the default event delivery allocation, you receive an error. See Streaming API Error Codes in the Streaming API Developer Guide. Event messages that are generated after exceeding the allocation are stored in the event bus. You can retrieve stored event messages as long as they are within the retention window of 72 hours.

Table 1. Default Allocations
Description Performance and Unlimited Editions Enterprise Edition Developer Edition
Maximum number of entities, including standard and custom objects, that you can select for Change Data Capture

If the same entity is selected in multiple channels, it is counted once toward the allocation.

5 5 5
Maximum number of custom channels 100 100 100
Event Delivery: maximum number of delivered event notifications within a 24-hour period, shared by all CometD clients 50,000 25,000 10,000

Change Data Capture Add-On License and Usage-Based Entitlements

To remove the limit on the number of entities that you can select for change notifications, you can purchase the Change Data Capture add-on license by contacting Salesforce.

The add-on increases the 24-hour allocation of delivered event notifications by 100,000 per day (3 million a month) as a usage-based entitlement. The entitlement gives you flexibility in how you use your allocations. The entitlement is not as strictly enforced as the default allocation. With the entitlement, you can exceed your 24-hour event delivery allocation by a certain amount.

Salesforce monitors event overages based on a calendar month, starting with the first day of the month or your contract start date. If you exceed the monthly entitlement, Salesforce contacts you to discuss your event usage needs. The entitlement used for monitoring monthly event overages is the daily allocation multiplied by 30.

Table 2. Example: Entitlement with One Change Data Capture Add-On License
Description Performance and Unlimited Editions Enterprise Edition
Maximum number of entities, including standard and custom objects, that you can select for Change Data Capture. No limit No limit
Event Delivery: entitlement for delivered event notifications within a 24-hour period, shared by all CometD clients

You can exceed this entitlement by a certain amount before receiving an error. Salesforce uses the monthly entitlement for event overage monitoring. The monthly entitlement is returned in the limits REST API resource.

150,000 (50K included with org license + 100K from add-on license)

Monthly entitlement: 4.5 million (1.5 million included with org license + 3 million from add-on license)

125,000 (25K included with org license + 100K from add-on license)

Monthly entitlement: 3.75 million (0.75 million included with org license + 3 million from add-on license)

To increase the entitlement for event delivery, contact Salesforce to purchase the High-Volume Platform Events add-on.

The maximum event message size that can be published is 1 MB. If your entity has hundreds of custom fields or many long text area fields, you could hit this limit. In this case, the change event message isn’t delivered and is replaced by a gap event message. For more information, see Gap Events.

  • Change events are based on platform events. The default allocations and usage-based entitlement of delivered events are shared between change events and high-volume platform events.
  • Apex change event trigger subscribers don’t count against the 24-hour CometD event delivery limit. The number of event messages that an Apex trigger can process depends on how long the processing takes for the trigger. The longer the processing time, the longer it takes for the trigger to reach the tip of the event stream.

Note

Monitor Your Event Usage

To monitor your monthly event delivery usage, use the limits REST API resource and inspect the MonthlyPlatformEvents value. The limits resource returns the monthly maximum allocation. If you don’t have an add-on license, your daily default maximum allocation is the monthly allocation returned divided by 30. For more information, see List Organization Limits in the REST API Developer Guide.