I am working with High Volume and Publish After Commit Platform Events and I am trying to understand if there is a way to know which Platform Events have been queued successfully.
We invoke the
EventBus.publish(events) method providing the list of Platform Events we want to publish and we receive a
Since we are working with High Volume Platform Events, we know that the
Database.SaveResult object gives us only the information regarding the successful or unsuccessful queuing operation for a specific Platform Event: it means even we receive a successful SaveResult, the related Platform Event may not be published later on.
My initial goal was to implement a tracking process for all the Platform Events:
- I create a list of Platform Events I want to publish;
- I invoke the
Eventbus.publish()method providing the list of Platform Events;
Eventbus.publish()method returns a list of
Database.SaveResultobject contains a reference (or the values itself) to a Platform Event and it gives information regarding the queuing operation (successfully/unsuccessfully).