Introduction

Salesforce offers the Pub/Sub API for subscribing to event streams, providing a robust mechanism for publishing and subscribing to binary event messages via gRPC and HTTP/2. This API facilitates an event-driven paradigm, optimizing high-volume data synchronization. Unlike traditional synchronous data requests from Salesforce, this approach allows Salesforce to proactively push data to other systems.

When a new account record is inserted into Salesforce, a corresponding Change Data Capture event is generated. Subscribers to this event can respond accordingly. In the described scenario, an external subscriber retrieves the latest event copy and seamlessly integrates it into an external database.

This methodology empowers other systems to query account data from the external database without the necessity of direct access to Salesforce.

Event Types in Salesforce

Salesforce presents a range of event types, including Change Data Capture and platform events, each offering distinct capabilities for streaming data. The choice of event type depends on your specific use case, although the overall architectural pattern remains consistent across types. While legacy event types like PushTopic and Generic Events still possess functional capabilities, they are no longer actively enhanced and have limited support.

For instance, Change Data Capture events notify external systems of data changes in real-time, providing an asynchronous mechanism. This means there is no guarantee of immediate availability of any specific change on external systems. However, by delivering data to external systems and leveraging them for data requests, the necessity to directly read large volumes of data from Salesforce is reduced.

Considerations for Complexity

While evented architectures enhance application performance and data synchronization scalability, they introduce some complexity. Message delivery is not always guaranteed, raising the possibility of losing changes in Salesforce in rare cases, resulting in synchronization issues with external systems.

It is crucial to implement a robust process for reconciling data synchronization issues that may arise over time. Despite having a reconciliation process, streaming events cannot offer the same assurances as a synchronous transactional approach. Nevertheless, if your business requirements align with these limitations, platform events provide significant scalability benefits.

Loading

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!