Kafka è una base popolare per le architetture event-driven — dove i servizi comunicano attraverso eventi anziché chiamate dirette. Il log di eventi durevole e scalabile di Kafka lo rende ben adatto ai sistemi event-driven, all'event sourcing e a CQRS.
Kafka come backbone degli eventi
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
