Event-Driven Architecture — Don't Publish Your Internals
Visual summary of the video: data-distribution events vs. explicit business events.
1. The Trap: CRUD events = data replication BAD
You think you decoupled. You just copied your DB to every consumer.
publishshipment status changed = CRUD / state-change event
Consumers infer internals: "status 4 = delivered". Change the meaning → break every consumer. No different than calling another service's DB directly.
2. The Fix: explicit business events GOOD
Model events around what actually happened, not state.
explicit event❌ status_changed✅ shipment_delivered
Domain vs Integration Events (inside vs outside)
One boundary. Internal = change freely. External = versioned contract.
inside = domain, private, granularoutside = integration, public, versioned
CDC & Reporting: don't leak internals
Distributing data is OK for reporting — but translate raw CDC to a public summary event first.
BAD: publish raw CDCGOOD: translate CDC → summary event → publish
The Design Question
"What can subscribers actually need this for?"
✅ "React & do something when it happens"
Send email on delivery → shipment_delivered. Explicit, meaningful. This is correct EDA.
⚠ "I want a local cache copy here"
Design smell. Ask: why does that data live there? Are service boundaries misaligned?