payload field. The specific contract depends on eventName, majorVersion, and minorVersion.
Fields to expect
Not all events include a full copy of the entity. Design your consumer to call the API when it needs the current state.
Illustrative example
Good practices
Version by majorVersion
Version by majorVersion
Keep separate validators if you consume more than one major version of the same event. Do not assume that two versions have the same fields.
Use identifiers, not names
Use identifiers, not names
Display names can change. Use
id or reference to reconcile data between systems.Save the original data
Save the original data
Keep the received JSON for as long as you need it for auditing. It helps diagnose failures in an external system.
Deduplication
UseeventId to prevent processing the same business event twice. Use attemptId only to audit a specific delivery. A retry keeps the same eventId but generates a new attemptId.