Event-Driven Architecture (EDA)
EDA is an architectural pattern where the flow of the program is determined by events - significant changes in state.
Core Concepts
- Events: Immutable facts about what happened
- Producers: Services that emit events
- Consumers: Services that react to events
- Event Broker: Middleware that routes events (Kafka, RabbitMQ)
Benefits
- Loose coupling between services
- Scalability and flexibility
- Real-time processing
- Audit trail of all events