Kafka adalah fondasi populer untuk arsitektur berbasis peristiwa — di mana layanan berkomunikasi melalui peristiwa daripada panggilan langsung. Log peristiwa Kafka yang tahan lama dan scalable membuatnya cocok untuk sistem berbasis peristiwa, event sourcing, dan CQRS.
Kafka sebagai tulang punggung 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
