Since there is no standard documentation on this, I'm willing to know how would platform events deal with:

  1. Duplicate Messages (Due to multiple triggers on the same record).
  2. Out Of Order Delivery.

Duplicate detection

This is an application design question. If multiple consumers for the same event try and CRUD the same Sobjects, then Upsert should be used and you may easily encounter locking issues. If multiple consumers for the same event do callouts, then either the remote system needs to be idempotent or you have to persist the Platform Events to sobjects with some logic to see if some key has already been used in the callout.

Out of order delivery

Platform Events are consumed in the order published. The ReplayId field is an ascending integer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.