Pub/Sub API provides a single interface for publishing and subscribing to platform events, including real-time event monitoring events, and change data capture events. Based on gRPC API and HTTP/2, Pub/Sub API efficiently publishes and delivers binary event messages in the Apache Avro format.
REQUIRED EDITIONS
Available in: Enterprise, Performance, Unlimited, and Developer Editions
Not Available in: Government Cloud
Discover
Learn about Pub/Sub API by checking out the pages under these sections.
With Pub/Sub API, you can build event-driven integration apps. Here are some examples of what you can do.
Publish and subscribe to custom platform events to send and receive real-time notifications in another system for business process integration. Some examples of business process integrations are sending real-time notifications for maintenance service or product orders.
Subscribe to change data capture events, and synchronize order data in an external inventory system.
Subscribe to Event Monitoring real-time events, and publish a platform event back into Salesforce to restrict a user’s profile when they log into Salesforce after working hours.
Subscribe to a standard platform event, such as AppointmentSchedulingEvent, and integrate with Google Calendar to update users’ calendars.
Pub/Sub API Benefits
Learn about what Pub/Sub API offers.
Publishing, subscribing, and event schema retrieval all in one API.
Final publish results of publish operations, and not intermediate queueing results.
Flow control that lets you specify how many events to receive in a subscribe call based on event processing speed in the client.
Scalable and secure publishing and delivery of platform events, change data capture events, and real-time event monitoring events.
Real-time, highly performant data streaming that uses compression through HTTP/2.
Support for 11 programming languages in the client that are offered by the gRPC API, such as Python, Java, Node, and C++. For all the supported languages, see https://grpc.io/docs/languages/.
An active online developer community presence for gRPC.
Bidirectional data streaming through the gRPC API. The client and the server can send a sequence of messages to each other using two independent streams.
Cross-cloud integration capabilities enabling the development of event-driven apps that integrate across Salesforce clouds.
Pub/Sub API vs. Other Salesforce APIs
Simplify your development with Pub/Sub API by using a single API to work with events instead of using disparate APIs. This table compares the tasks that you perform with Pub/Sub API versus other APIs.
Task
Can accomplish with Pub/Sub API
How to accomplish with other APIs
Publish platform events
Pub/Sub API
Data APIs: SOAP API, REST API, Bulk API
Subscribe to events: platform events, change data capture events, real-time event monitoring events, and standard events