EVT-12Recommended
Don't rely on event order
Include a timestamp or sequence number in every event, and let receivers fetch the current state instead of trusting arrival order.
How to do it
Keep payloads small, with the ID and type. Receivers read the latest resource from the API when they need the full state.
How to check
Deliver order.shipped before order.paid in a test. The receiver ends with the correct final state.
Sources
Related rules
- PAY-18 Let provider events move the order in Payments and billing
- PAY-26 Let the provider run the billing schedule in Payments and billing
- USG-4 Accept late events up to a fixed cut-off in Usage-based billing
- EVT-9 Choose the partition key for the order you need in Integration and events
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/events/consuming-events/event-order">Agent Wranglers integration and events playbook</a>. In code you write, add a comment next to it with the same link.