Kafka jest popularną podstawą dla architektur opartych na zdarzeniach — gdzie usługi komunikują się poprzez zdarzenia zamiast bezpośrednich wywołań. Trwały, skalowalny dziennik zdarzeń Kafki sprawia, że doskonale nadaje się do systemów opartych na zdarzeniach, event sourcingu i CQRS.
Kafka jako szkielet zdarzeń
In event-driven architecture, services emit and react to EVENTS:
→ a service publishes events to Kafka ("OrderPlaced", "PaymentReceived")
→ other services CONSUME and react (decoupled — the producer doesn't know the consumers)
→ Kafka = the durable, scalable EVENT BACKBONE connecting services
→ services are decoupled, communicating via events through Kafka
