EventBus Namespace
The EventBus namespace provides classes and methods for platform events and Change Data Capture events.
The following are the classes in the EventBus namespace.
-
Contains header fields of Change Data Capture events.
-
EventPublishFailureCallback Interface
Implement this interface to track platform event messages that failed to publish. The
onFailure()method in this interface is called when the final result of the asynchronous publish operation becomes available. -
EventPublishSuccessCallback Interface
Implement this interface to track platform event messages that were published successfully. The
onSuccess()method in this interface is called when the final result of the asynchronous publish operation becomes available. -
Contains the result of an Apex publish callback when the event publishing failed. This interface is used as a parameter in the
onFailuremethod of theEventPublishFailureCallbackinterface. -
Contains the result of an Apex publish callback when the event publishing succeeded. This interface is used as a parameter in the
onSuccessmethod of theEventPublishSuccessCallbackinterface. -
Contains methods that simulate the successful delivery or failed publishing of platform event or change event messages in an Apex test.
-
Provides information about the platform event or change event trigger that’s currently executing, such as how many times the trigger was retried due to the
EventBus.RetryableException. Also, provides a method to resume trigger executions.
See Also