Event Notification Pattern

An event-driven pattern where a system signals that something happened by publishing a minimal event; receiving systems decide independently whether and how to react, fetching any needed data themselves.

Problem

In microservices, when service A changes state, dependent services B and C need to know. One approach: A calls B and C directly (tight coupling — A must know about B and C, and they share the same availability). Another: A publishes an event with the full payload (Event-Carried State Transfer — but now every consumer gets all data even if they don’t need it). Event Notification sits between these extremes.

Solution / Explanation

The publishing service emits a thin event: just enough information to identify what happened and where to get more details.

Typical Event Notification payload:

{
  "type": "OrderPlaced",
  "orderId": "ord-12345",
  "timestamp": "2026-05-06T10:00:00Z"
}

The event does not contain the full order details. Subscribers who need order details make a follow-up call to the Order Service API.

Characteristics

AspectValue
Payload sizeMinimal — just identifier and event type
Publisher knowledgePublisher doesn’t know who consumes or what they need
Consumer autonomyConsumers decide whether to react and what to fetch
Data freshnessConsumers always get current data (via follow-up call)
CouplingPublisher ↔ Consumer: decoupled on data; Consumer ↔ Publisher API: coupled on query

When to Use

  • Consumers have different data needs — sending full payload wastes bandwidth for most
  • Publisher wants maximum decoupling — no knowledge of what consumers do with the event
  • Notification of state change is more important than the state itself
  • Events are frequent but only a few consumers need data for each event

Risks

Thundering herd: If 100 consumers all follow up on the same event, the publishing service gets 100 API calls simultaneously. Mitigation: use Event-Carried State Transfer for high-fan-out events.

Temporal coupling via follow-up: The consumer still needs the publisher to be available when it makes the follow-up call. Not fully temporally decoupled.

Trade-offs

BenefitCost
Minimal event payload (bandwidth efficient)Follow-up API call required (latency, coupling)
Publisher doesn’t dictate consumer behaviorThundering herd risk on high fan-out
Easy to add new consumersConsumer must be online to fetch data
Event log is not polluted with full stateState may have changed by follow-up time
PatternPayloadFollow-up NeededCoupling
Event NotificationMinimalYesLow (data)
Event-Carried State TransferFull stateNoNone
Event SourcingState-changing command as eventN/AChanges persistence model