Event-driven arhitektura (EDA) je dizajn gdje komponente komuniciraju proizvodnjom i reagiranjem na događaje (nešto što se dogodilo) — umjesto direktnih poziva. Omogućava labavu povezanost, skalabilnost i odgovornost, te je česta u modernim distribuiranim sustavima.
Što je event-driven arhitektura
Components communicate via EVENTS (a notification that something happened):
→ PRODUCERS emit events ("order placed", "user signed up") without knowing who handles them
→ CONSUMERS react to events they care about (asynchronously)
→ an event BROKER/bus (Kafka, message queue) routes events
→ components are DECOUPLED → they react to events, not call each other directly.
