Design: Microservices Communication with Message Brokers
Design focuses on integrating Kafka and RabbitMQ as message brokers for microservices communication. Out of scope are the internal logic of microservices and detailed security implementations.
Functional Requirements
FR1: Enable asynchronous communication between microservices
FR2: Support message durability and reliability
FR3: Handle high throughput of messages (up to 100,000 messages per second)
FR4: Ensure message ordering where required
FR5: Support multiple consumers for the same message stream
FR6: Allow message filtering and routing
FR7: Provide monitoring and alerting for message processing failures
Non-Functional Requirements
NFR1: Latency for message delivery should be under 100ms p99
NFR2: System availability target of 99.9% uptime
NFR3: Support horizontal scaling of message brokers and consumers
NFR4: Ensure at-least-once delivery semantics
NFR5: Handle message retention for up to 7 days