Event-driven architecture allows components to react to facts without direct synchronous coupling. The design must still define delivery guarantees, ordering, schema evolution, and operational recovery.
Distinguish events from commands
An event describes something that happened. A command asks a specific handler to do something. Naming and routing should make that difference clear because events may have multiple subscribers while commands usually have one intended owner.
Define delivery semantics
Many message systems provide at-least-once delivery. Consumers must tolerate duplicates. Exactly-once claims often apply only within a narrow processing boundary and should not be assumed across databases and external services.
Handle ordering and schema evolution
Decide whether ordering is required globally, per entity, or not at all. Include aggregate identifiers and versions when consumers need to detect stale events. Version event schemas and support compatible evolution.
Operate the system
Monitor consumer lag, retries, dead-letter queues, and poison messages. Provide replay procedures and ensure replaying an event cannot cause unsafe duplicate side effects.
Checklist
- Separate event facts from command requests.
- Document delivery and ordering guarantees.
- Make consumers idempotent.
- Version event schemas compatibly.
- Monitor lag, retries, and dead-letter handling.