Skip to content

Lesson 2 of 4 · 40 min

Platform Events and the at-least-once contract

The publish gotchas, replay ids, and why every subscriber ends up idempotent.

Course content · 4 lessons
  1. Request-reply, done properly 35 min
  2. Platform Events and the at-least-once contract 40 min
  3. Batch — the pattern everyone pretends they have outgrown 30 min
  4. The reconciliation job — trust, but verify 35 min

Request-reply fell over the moment billing went down for maintenance and took our transaction with it. This lesson decouples the two systems with a Platform Event — and then spends most of its time on the contract nobody reads: delivery is at least once, ordering is per-partition, and the 72-hour replay window is shorter than a long weekend plus a broken pager.

By the end the subscriber is idempotent, stores its replay id after every batch, and the demo deliberately delivers one event twice so you can watch the external-id upsert shrug it off.

to move to open esc to close Full search