Correct answer: C
Both Platform Events and Outbound Messaging offer declarative means for
asynchronous near-real time needs. They aren't best suited for real-time integrations
Explanation
Explanation:
This question tests the architect's understanding of the appropriate use cases for Platform Events versus Outbound Messaging. Both are asynchronous, near-real-time mechanisms rather than true real-time integration tools.
Why this is the correct evaluation point
Declarative means:
Platform Events can be published declaratively through Flow or Process Builder, while Outbound Messages can be configured declaratively through Workflow Rules or Flow. Neither requires code for basic setup.
Asynchronous near-real-time:
Both mechanisms operate asynchronously. Outbound Messages are sent after a record is committed to the database, while Platform Events are published to an event bus for asynchronous delivery. Neither provides the synchronous, immediate response characteristic of a true real-time API call.
Not best suited for real-time:
True real-time integrations typically use synchronous request-response patterns, such as REST API callouts that provide an immediate response. Platform Events and Outbound Messages are inherently asynchronous, making them suitable for near-real-time scenarios where a small delay, such as seconds or minutes, is acceptable.
Fan-out consideration with 3,000 customers
The scenario mentions 3,000 customers viewing messages in Salesforce. This is an important architectural consideration.
Platform Events have limits on concurrent subscribers. If 3,000 customers each open a CometD subscription to view messages, the organization could exceed the applicable concurrent subscriber limit, causing subscription failures for additional users.
Outbound Messages are not designed for massive fan-out. They send SOAP messages to a configured endpoint URL for each message and are not intended to broadcast messages to thousands of individual users viewing a page.
Why Other Options Are Incorrect
A. In both Platform Events and Outbound Messaging, the event messages are retried by and delivered in sequence, and only once. Salesforce ensures there is no duplicate message delivery.
Incorrect. Neither mechanism guarantees in-sequence delivery or exactly-once delivery. Both can operate with at-least-once delivery semantics, meaning duplicate messages can occur. Outbound Messages may arrive out of sequence, and Platform Events do not provide a universal guarantee of ordering under all delivery conditions.
Therefore, an architecture must account for possible duplicate or out-of-order messages rather than assuming Salesforce guarantees exactly-once, ordered delivery.
B. Message sequence is possible in Outbound Messaging, but not guaranteed with Platform Events. Both offer very high reliability. Fault handling and recovery are fully handled by Salesforce.
Incorrect. Message sequence is not guaranteed in Outbound Messaging either, because retries can result in messages being delivered in a different order. In addition, fault handling and recovery are not completely handled by Salesforce for either mechanism.
Platform Events may require appropriate subscriber-side recovery mechanisms, while Outbound Messages retry delivery for a limited period and can eventually discard a message if the endpoint remains unavailable.
Key Exam Takeaway
Platform Events and Outbound Messaging are asynchronous mechanisms suited to near-real-time integration scenarios. They should not be treated as synchronous real-time APIs or as mechanisms that guarantee exactly-once, ordered delivery.
For architecture questions, also consider subscriber limits, fan-out requirements, retry behavior, ordering, and recovery responsibilities when selecting between Salesforce integration mechanisms.