Salesforce & Enterprise Connectors ยท Developer / Senior

Platform Events & Change Data Capture (CDC) โ€” Interview Questions & Scenarios (2026)

Event replay channels, 72-hour retention, duplicate event deduplication, and CDC vs Platform Events.

Salesforce Platform Events & CDC Architecture Diagram showing Salesforce Event Bus, ReplayId buffering, and MuleSoft streaming subscriber. Salesforce Event Bus /event/Order_Event__e 72-Hour Retention Window Event Stream (Replay Window) ID: 101 ID: 102 ID: 103 ID: 104 NOW MuleSoft Subscriber replayId="-1" -> Latest events only replayId="-2" -> Full 72h replay Guaranteed Exactly-Once via Idempotent Filter Salesforce event delivery is at-least-once. MuleSoft wraps the listener in an Idempotent Message Validator keyed on `replayId` or `event.header.eventId`.
Figure C.1: Salesforce Event Bus to MuleSoft Streaming Channel โ€” ReplayId semantics (-1 vs -2) and CDC record sync.

โšก Platform Events & Change Data Capture (CDC)

Event replay channels, 72-hour retention, duplicate event deduplication, and CDC vs Platform Events.

Q1 [DEVELOPER / SENIOR] โฑ๏ธ 1 min read Module C

What are Platform Events? How do you subscribe in MuleSoft?

โšก Self-Test Mode Ready
โœ“ ANSWER

Platform Events: Custom events you define in Salesforce and publish explicitly. Business events:

Order Closed, Payment Processed.

CDC (Change Data Capture): Automatic events fired by Salesforce on any record change โ€” no

Apex/code needed. Includes changeType (CREATE/UPDATE/DELETE), changedFields.

Subscribe to Platform Event

REPLAYID MEANING

-1 New events only (default for initial deploy)

-2 All retained events (last 72 hours) โ€” use on app restart

N Replay from specific event ID forward

๐ŸŽฏ๐ŸŽฏ Interview Pitch - Say It Like This (30 Sec)
"We implement event-driven architectures between Salesforce and MuleSoft using Platform Events and Change Data Capture. In MuleSoft, we subscribe using the Replay Channel Listener backed by persistent ObjectStore storage to save the Replay ID, guaranteeing at-least-once delivery and zero event loss even during downstream system downtime or planned maintenance."
๐Ÿ’ผ๐Ÿ’ผ Real-Time Project Example

Project: Commercial Banking โ€” Real-Time Order Status Notification.

Problem: Traditional scheduled polling every 2 minutes was too slow for customer notifications and wasted 70,000 API calls daily.

What I Did: Subscribed to Salesforce `Order_Status_Event__e` Platform Events via MuleSoft Replay Channel Listener, routing events through Anypoint MQ for async processing.

Result: Achieved end-to-end event notification latency of under 400ms while eliminating 100% of polling API calls.

Q2 [DEVELOPER / SENIOR] โฑ๏ธ 1 min read Module C

What is event retention? What if Mule app is down >72 hours?

โšก Self-Test Mode Ready
โœ“ ANSWER

Salesforce Platform Events and CDC are retained for 72 hours. If MuleSoft subscriber restarts with

replayId="-2" , it receives all events from the last 72 hours โ€” nothing is lost for normal downtime.

If downtime exceeds 72 hours: those events ARE permanently lost. Mitigation: also publish to

Anypoint MQ (default 4โ€“7 day retention, configurable up to 14 days; 10 MB max message payload) as durable backup fan-out for critical events. Or implement a Scheduler that

queries Salesforce directly for records modified during the downtime window using LastModifiedDate

> :lastRun watermark.

Q3 [DEVELOPER / SENIOR] โฑ๏ธ 1 min read Module C

How do you handle duplicate Platform Events (at-least-once delivery)?

โšก Self-Test Mode Ready
โœ“ ANSWER

Salesforce uses at-least-once delivery โ€” duplicates are possible. Implement idempotency with

ObjectStore:

Idempotency Pattern

// 1. Extract Replay ID or business key from event

// 2. Check ObjectStore

os:contains(key=replayId, objectStore=idempotency-store)

// EXISTS โ†’ skip and ACK

// NOT EXISTS โ†’ process โ†’ os:store(key, TTL=72h) โ†’ ACK

Use acknowledgementMode="MANUAL" so ACK only happens after successful ObjectStore write +

processing.

๐ŸŽฏ๐ŸŽฏ Interview Pitch - Say It Like This (30 Sec)
"We implement event-driven architectures between Salesforce and MuleSoft using Platform Events and Change Data Capture. In MuleSoft, we subscribe using the Replay Channel Listener backed by persistent ObjectStore storage to save the Replay ID, guaranteeing at-least-once delivery and zero event loss even during downstream system downtime or planned maintenance."
๐Ÿ’ผ๐Ÿ’ผ Real-Time Project Example

Project: Healthcare โ€” Real-Time Order Status Notification.

Problem: Traditional scheduled polling every 2 minutes was too slow for customer notifications and wasted 70,000 API calls daily.

What I Did: Subscribed to Salesforce `Order_Status_Event__e` Platform Events via MuleSoft Replay Channel Listener, routing events through Anypoint MQ for async processing.

Result: Achieved end-to-end event notification latency of under 400ms while eliminating 100% of polling API calls.

Q4 [DEVELOPER / SENIOR] โฑ๏ธ 1 min read Module C

Difference between Platform Events and CDC?

โšก Self-Test Mode Ready
โœ“ ANSWER
ASPECTPLATFORM EVENTSCDC
Who publishesYou publish explicitly via Apex, Flow, or MuleSoftSalesforce fires automatically on any record change
PayloadCustom fields you defineIncludes changeType, changedFields, old+new values
Use caseBusiness process events (Order Closed, Payment Done)Data synchronization โ€” DB replica, DW sync
Channel/event/EventName__e/data/ObjectChangeEvent
๐ŸŽฏ๐ŸŽฏ Interview Pitch - Say It Like This (30 Sec)
"We implement event-driven architectures between Salesforce and MuleSoft using Platform Events and Change Data Capture. In MuleSoft, we subscribe using the Replay Channel Listener backed by persistent ObjectStore storage to save the Replay ID, guaranteeing at-least-once delivery and zero event loss even during downstream system downtime or planned maintenance."
๐Ÿ’ผ๐Ÿ’ผ Real-Time Project Example

Project: Logistics โ€” Real-Time Order Status Notification.

Problem: Traditional scheduled polling every 2 minutes was too slow for customer notifications and wasted 70,000 API calls daily.

What I Did: Subscribed to Salesforce `Order_Status_Event__e` Platform Events via MuleSoft Replay Channel Listener, routing events through Anypoint MQ for async processing.

Result: Achieved end-to-end event notification latency of under 400ms while eliminating 100% of polling API calls.

โ† Salesforce Connector & Bulk API 2.0OAuth 2.0 & JWT Bearer Token Flow โ†’