When a StreamHub creator goes live, the stream service publishes stream.started. Notification, analytics, search, and moderation services each react independently — no central orchestrator, no synchronous call chain that breaks when one service is slow.
Events vs commands
| Aspect | Event (past tense) | Command (imperative) |
|---|---|---|
| Naming | stream.started, payment.completed | SendNotification, ProcessPayment |
| Coupling | Publisher doesn't know subscribers | Sender knows receiver |
| Routing | Topic/bus; many consumers | Point-to-point queue |
| Failure | One slow consumer doesn't block others | Blocked queue stalls sender |
| StreamHub | Kafka topic `stream.lifecycle` | RabbitMQ transcode job queue |
Naming
Event (past tense)stream.started, payment.completedCommand (imperative)SendNotification, ProcessPaymentCoupling
Event (past tense)Publisher doesn't know subscribersCommand (imperative)Sender knows receiverRouting
Event (past tense)Topic/bus; many consumersCommand (imperative)Point-to-point queueFailure
Event (past tense)One slow consumer doesn't block othersCommand (imperative)Blocked queue stalls senderStreamHub
Event (past tense)Kafka topic `stream.lifecycle`Command (imperative)RabbitMQ transcode job queue
Event-driven flow
Amazon MSK event pipeline
StreamHub production architecture (AWS)
EDA building blocks
- Event: Immutable record of something that happened, with schema version.
- Event bus / broker: Kafka topic or cloud event bridge routing events to subscribers.
- Event handler: Stateless consumer that reacts to one event type.
- Event store (optional): Append-only log as source of truth (event sourcing).
- Schema registry: Enforces Avro/Protobuf/JSON Schema compatibility across producers.
The rest of this guide is part of Pro
Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.
Still to come · 3 sections
- Choreography vs orchestration
- Event schema example
- Handling failures in EDA
Test yourself
Answer these before moving on — recall is what makes it stick.