Skip to content
Back to Blog
Integration

Platform Events vs Change Data Capture in Salesforce

Sep 2, 2026
SCSunny Chauhan
Platform Events vs Change Data Capture in Salesforce

Change Data Capture publishes an event every time a record is created, updated, deleted or undeleted, with a schema Salesforce defines for you. Platform events publish only when something explicitly publishes them, with a schema you define. Both ride the same event bus, both keep messages for 72 hours, and both cap out at 1 MB per message.

The choice comes down to one question: do you want to hear about record changes, or about things that happened? If it is record changes, CDC saves you from writing triggers. If it is business events that do not map cleanly to a row changing, platform events are the only option.

The comparison

Change Data CapturePlatform Events
Who defines the schemaSalesforceYou
What triggers publicationAny record create, update, delete or undeleteAn explicit publish from Apex, Flow or the API
Event object nameAccountChangeEvent, Shipment__ChangeEventOrder_Placed__e
Can an external system publishNoYes
Carries old and new valuesYes, plus the changed field listOnly what you put in it
Retention72 hours72 hours
Max message size1 MB1 MB
Best forKeeping an external store in syncSignalling that something happened

Where the allocations actually bite

This is where designs fail, and the numbers are not symmetric.

Delivery, per 24 hours

EditionCDC events deliveredPlatform events delivered
Performance and Unlimited50,00050,000
Enterprise25,00025,000
Developer10,00010,000
Professional with the API add-onNot applicable25,000

The add-on licence adds 100,000 events per day, which Salesforce describes as 3 million a month, and moves you to a monthly usage model that tolerates spikes.

Publishing, per hour

Platform events have a separate publishing allocation: 250,000 events an hour on Enterprise, Performance and Unlimited, and 50,000 an hour on Developer. The add-on adds 25,000 an hour.

CDC has no equivalent publishing cap, because you are not the one publishing. Salesforce publishes on every record change whether you are ready or not, which is the risk in the next section.

The exemption that saves most designs

The delivery allocation counts subscriptions through the Pub/Sub API, CometD, the empApi Lightning component and event relays. It does not count Apex triggers, Flows or Process Builder.

So an event consumed entirely inside Salesforce is effectively free against the delivery number. The allocation is a limit on what leaves the platform, not on what happens inside it. Teams that model it as a general event budget end up buying an add-on they did not need.

The failure mode: CDC plus a data load

CDC publishes on every record change, including changes you did not think of as changes.

A batch Apex job that touches 40,000 records publishes 40,000 change events. So does an ETL run, a data load, or a mass update from a deployment. On Enterprise Edition that single job has spent 25,000 of a 25,000-event daily delivery allocation and started dropping deliveries for everything else on the bus.

Three ways out, in the order most teams should try them:

  1. Select fewer objects. Every entity you enable multiplies the exposure. Enable what a subscriber actually reads.
  2. Move bulk work to a channel that does not publish. If the consumer is inside Salesforce, a trigger or Flow does not draw down delivery allocation.
  3. Buy the add-on. Legitimate at real volume, and worth doing deliberately rather than after an outage.

The general rule: CDC is excellent for steady change traffic and dangerous for batch traffic, because it has no idea which one it is looking at.

The ISV asymmetry worth knowing

If you distribute a managed package, the two features treat you differently, and the difference is easy to get backwards.

Change Data Capture entity selection. The default allocation is 5 entities across all channels. That count includes selections made by the org, by unmanaged packages, and by managed packages, but it excludes AppExchange released managed packages. An app that has been through the security review and released on AppExchange does not consume the customer's five slots.

Platform event definitions. The opposite. Salesforce is explicit that platform events originating from an installed managed package share the org's allocation for the maximum number of event definitions. Definitions per org run to 100 on Performance and Unlimited, 50 on Enterprise, and 5 on Developer and Professional.

CDC entitiesPlatform event definitions
Does a released AppExchange package consume the customer's allocationNoYes
Org allocation5 entities by default, removed with the add-on100 Performance and Unlimited, 50 Enterprise, 5 Developer and Professional

Read that table before you design the package, not after. An app that defines eight platform events is unusable on Professional Edition, where the ceiling is five, and you will hear about it from the first customer who tries.

For the wider set of limits that behave differently inside a packaged app, see our guide to governor limits in verified managed packages.

How you subscribe

The current answer is the Pub/Sub API, a gRPC service that replaced the older CometD approach and was re-architected for throughput. It handles both CDC and platform events, so the subscription code does not change when you change your mind about which one to use.

The older options still exist. CometD works. PushTopic events still work and are still tied to specific records. empApi is the right choice inside a Lightning component. New integration work should default to Pub/Sub.

One detail that catches people: retention is 72 hours. A subscriber that is down for a long weekend comes back to a replay window that has already closed, so the recovery path has to be a reconciliation query, not a replay. Design that before you need it.

Which one to pick

Use Change Data Capture when an external system needs to mirror Salesforce records, when you want old and new values without writing them yourself, and when the change volume is steady rather than bursty.

Use platform events when the thing you are signalling is not a record change, when an external system needs to publish into Salesforce, or when you want control over the payload because a subscriber outside your team depends on its shape.

Use both in most real architectures. They are not competitors. CDC keeps the data in step and platform events carry the decisions.

Frequently Asked Questions

What is the difference between platform events and change data capture?

Change Data Capture publishes automatically whenever a record is created, updated, deleted or undeleted, using a schema Salesforce defines. Platform events publish only when Apex, a Flow, or an external system explicitly publishes one, using a schema you define. CDC reports what changed in the database, platform events report what happened in the business.

How long are Salesforce events retained?

72 hours for both platform events and change events. A subscriber offline longer than that cannot replay the events it missed, so any recovery plan needs a reconciliation query rather than a replay.

How many objects can I enable for Change Data Capture?

Five entities by default, counted across all channels. Selections by the org, by unmanaged packages and by managed packages all count against it. Selections by AppExchange released managed packages do not. A Change Data Capture add-on licence removes the entity limit entirely.

Do platform events count against API limits?

They have their own allocations rather than drawing on the REST API request pool. Publishing is capped hourly and delivery is capped per 24 hours. Delivery counts subscriptions through the Pub/Sub API, CometD, empApi and event relays, but not Apex triggers, Flows or Process Builder.

What replaced the Streaming API in Salesforce?

The Pub/Sub API, a gRPC service that handles platform events, change events and PushTopic events through one interface. CometD still works, but new integrations should be built on Pub/Sub.

What is the maximum platform event size?

1 MB per event message, the same for change events. Anything larger has to be a reference the subscriber fetches rather than a payload you publish.

Can an external system publish a platform event into Salesforce?

Yes. Platform events can be published through the REST or SOAP API, which is one of the main reasons to choose them over CDC. Change events cannot be published externally, since only Salesforce publishes them and only in response to a record change.

Do managed package platform events count against the customer's limit?

Yes. Salesforce states that platform events originating from an installed managed package share the org's allocation for the maximum number of platform event definitions. This is the opposite of the CDC entity rule, where a released AppExchange package is exempt.

Sources

  1. Salesforce Developers, Platform Event Allocations: publishing and delivery allocations by edition, event definition limits, managed package sharing rule, 72 hour retention, 1 MB message size. 2/ Salesforce Developers, Change Data Capture Allocations: 5 entity default, AppExchange released managed package exemption, delivery allocations by edition, add-on terms. 3/ Salesforce Developers, What's the Difference Between the Salesforce Events. 4/ Salesforce Developers Blog, Design Considerations for Change Data Capture and Platform Events. Verified 2 September 2026.

All Blogs