-
Notifications
You must be signed in to change notification settings - Fork 458
PlatformEventPublishCallback
pozil edited this page Nov 14, 2024
·
4 revisions
Demonstrates how to write Platform Event publish success and failure callbacks
Group Platform Event Recipes
Implements
EventBus.EventPublishFailureCallback, EventBus.EventPublishSuccessCallback
Map that correlates event UUIDs with event data
private eventMap
Map<String,EventInfo>
public PlatformEventPublishCallback(List<EventInfo> eventInfos)
Name | Type | Description |
---|---|---|
eventInfos | List<EventInfo> |
Callback for events that failed to publish Note: this method is always called by the Automation user
public void onFailure(EventBus.FailureResult result)
Name | Type | Description |
---|---|---|
result | EventBus.FailureResult |
void
Callback for events that were successfully published Note: this method is always called by the Automation user
public void onSuccess(EventBus.SuccessResult result)
Name | Type | Description |
---|---|---|
result | EventBus.SuccessResult |
void
private void insertTask(List<String> eventUuids, Boolean isSuccess)
Name | Type | Description |
---|---|---|
eventUuids | List<String> | |
isSuccess | Boolean |
void
Data object that holds the minimum amount of information to identify our event and potentially republish it. We recommend that you don't store all event fields to avoid hitting callback handler internal limits.
public eventUuid
String
public accountId
Id
public EventInfo(String eventUuid, Id accountId)
Name | Type | Description |
---|---|---|
eventUuid | String | |
accountId | Id |