Design: Event Schema Design for Microservices
Design focuses on event schema structure, versioning, metadata, and validation. It excludes the underlying messaging infrastructure and microservice business logic.
Functional Requirements
FR1: Define a clear and consistent event schema for communication between microservices
FR2: Support multiple event types with versioning to allow backward compatibility
FR3: Ensure events carry enough metadata for tracing and debugging
FR4: Allow schema evolution without breaking existing consumers
FR5: Support validation of event data before publishing
FR6: Enable efficient serialization and deserialization for low latency
Non-Functional Requirements
NFR1: Handle up to 10,000 events per second
NFR2: Event delivery latency should be under 100ms p99
NFR3: Schema changes must not cause downtime or data loss
NFR4: Support 99.9% availability for event publishing and consumption