Skip to content

PlatformEventPublishCallback

pozil edited this page Nov 14, 2024 · 4 revisions

PlatformEventPublishCallback

Demonstrates how to write Platform Event publish success and failure callbacks

Implemented types

EventBus.EventPublishFailureCallback , EventBus.EventPublishSuccessCallback

Group Platform Event Recipes

See PlatformEventRecipes

Constructors

public PlatformEventPublishCallback(List<EventInfo> eventInfos)


Fields

private eventMapMap<String,EventInfo>

Map that correlates event UUIDs with event data


Methods

public void onFailure(EventBus.FailureResult result)

Callback for events that failed to publish Note: this method is always called by the Automation user

public void onSuccess(EventBus.SuccessResult result)

Callback for events that were successfully published Note: this method is always called by the Automation user

private void insertTask(List<String> eventUuids, Boolean isSuccess)


Classes

EventInfo

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.

Constructors

public EventInfo(String eventUuid, Id accountId)

Fields

public eventUuidString
public accountIdId


Clone this wiki locally