Newer Version Available

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

Getting Started with Streaming API

Streaming API enables streaming of events using push technology and provides a subscription mechanism for receiving events in near real time. The Streaming API subscription mechanism supports multiple types of events, including PushTopic events, generic events, platform events, and Change Data Capture events.

Did you know? Pub/Sub API is a newer API that you can use to publish and subscribe to platform events and change data capture events. Based on gRPC API and HTTP/2, Pub/Sub API efficiently publishes and delivers binary event messages and supports multiple programming languages.

Note

Consider these applications for Streaming API.

Applications That Poll Frequently
Applications that have constant polling action against the Salesforce infrastructure consume unnecessary API calls and processing time. They can benefit from Streaming API because it reduces the number of requests that return no data.
General Notification
Applications that require general notification of data changes in an org. By using Streaming API, these applications can reduce the number of API calls and improve performance.

You can use Streaming API with any Salesforce org as long as you enable the API. To ensure continuity during instance refreshes and org migrations, we recommend using your org’s My Domain instead of its instance in the Streaming API endpoint.

Note