Kafka ialah asas popular untuk seni bina dipacu peristiwa (event-driven architecture) — di mana perkhidmatan berkomunikasi melalui peristiwa (event) dan bukannya panggilan langsung. Log peristiwa Kafka yang tahan lasak dan boleh skala menjadikannya sangat sesuai untuk sistem dipacu peristiwa, event sourcing, dan CQRS.
Kafka sebagai tulang belakang peristiwa
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
