02 Event Driven Integration

Event-Driven Integration

Event-driven integration replaces direct dependencies with shared event contracts and one central broker that stores and delivers them.

Why A Broker Instead Of Point-To-Point

Point-to-point integration couples systems in ways that are hard to see and hard to change. Each new consumer often requires another custom adapter, another data mapping, and another operational responsibility.

A broker in the middle changes the dependency shape:

  • Producers publish meaningful events.
  • Consumers subscribe to the topics of the contracts they understand, each through a subscription of its own.
  • The broker handles persistence and delivery mechanics.
  • Route legs transform at the edges, and processing legs from topic to topic when needed.
  • Context tooling shows who depends on what.

Event Granularity

Prefer fact events that contain the relevant state, such as CustomerCreated with a CustomerV1 payload. Notification events that only say CustomerChanged and force consumers to call back can be useful in some cases, but they reintroduce coupling and target availability dependencies.

Ordering

Global ordering and high parallelism conflict. If ordering matters, make the ordering key explicit, such as customer ID or order ID. Use a key_shared subscription for strict ordering per entity; Topics, Subscriptions And The Broker compares the subscription types.

Idempotency

Consumers should handle duplicates where possible. Replay, retry, and failover are normal in distributed systems. A non-idempotent target should be treated as an explicit operational risk.

Backpressure

Backpressure is an operational signal, not just a performance issue. If a target system cannot keep up, offramps should avoid overwhelming it, retries should be bounded, and monitoring should show backlog growth.