Will Change Data Capture eventually replace PushTopics/Streaming API

change-data-captureplatform-eventpushtopicstreaming-api

I need to notify an external system component about changes in Salesforce data. I am confused by the fact that there exist two seemingly competing solutions in Salesforce for that. Both look very similar with some noteworthy differences:

PushTopics with Notification via Streaming API

  • Declare Data condition with Metadata
  • Relaxed limits and no costs involved
  • Only listen via CometD client. No triggers.

Change Data Capture as a type of Platform Event

  • Can't listen for selective data changes (yet)
  • Very restricted limits and high costs
  • Listen to via Apex Triggers

So what I am asking is:

  1. What is Salesforce.com plan regarding those concepts? Will Platform Events replace Streaming channels and will Change Data Capture replace PushTopics?
  2. How did you decide in such cases in the past? What did you use? And why?

Best Answer

There are a lot of considerations behind this and I'm not on the engineering teams that are behind these features so take my answer with a grain of salt.

The TL;DR is yes, Change Data Capture (CDC) will replace PushTopics just like Platform Events (PE) will replace Generic events. All four event types are part of the streaming APIs but there are two generations:

Streaming API generations

I summarized this in 2019 in this post: A Refresher on the Four Streaming APIs and a Monitoring Tool

We haven't announced plans to retire the first generation of events but all of the innovation our teams are working on are focused on the second generation.

On a related note, we are working on a new Event Bus and we started a pilot in August 2021 for the new Pub/Sub API which uses gRPC as a replacement of CometD. Stay tuned for more news on that front.

Related Topic