Event Message in Messaging Systems

An event message is a type of message that announces a notable fact that already happened in the sender’s system — such as OrderCreated, PaymentCaptured, or InventoryReserved. Unlike a command message, the sender does not tell anyone what to do next; it simply publishes the fact to a topic and lets interested services react independently.

Event with Detail vs. Event with Identifier

One of the most important design decisions in event-driven architectures is how much data to put inside the event payload. There are two main styles:

1. Event with Detail (Event-Carried State Transfer)

The event body carries a document containing all the fields consumers typically need to react without calling the sender back.

Order Service publishes an event carrying the full order to an event bus, which delivers it to Delivery Service Order Service publishes an event carrying the full order to an event bus, which delivers it to Delivery Service
Event with detail (event-carried state transfer): the event carries the whole order, so Delivery Service needs no extra API call · Made with Akriti
{
  "eventType": "ORDER_CREATED",
  "orderId": "order_42",
  "customerId": "cust_91",
  "totalAmount": 49.90,
  "shippingAddress": {
    "city": "Bengaluru",
    "postalCode": "560001"
  },
  "items": [
    { "sku": "BOOK-01", "qty": 2 }
  ]
}
  • Key benefit: Unlike identifier-based events, receivers require no extra synchronous API calls, avoiding temporal coupling between consumer and producer.
  • When it fits: When consumers need an immutable snapshot of the state at the moment the event occurred, or when the sender does not keep a queryable history of past states.
  • Drawbacks:
    • Larger message sizes and tighter schema-evolution discipline (changing or removing a field can affect downstream consumers).
    • Risk of spreading sensitive PII across topics if you blindly dump entire database records into events.

2. Event with Identifier (Notification Event)

The event body carries only a minimal reference — typically an entity ID or event-log ID — notifying subscribers that something changed.

{
  "eventType": "ORDER_CREATED",
  "orderId": "order_42",
  "occurredAt": "2026-11-25T16:10:00Z"
}

After receiving the notification, each interested consumer calls an API (REST or gRPC) on the sender (GET /orders/order_42) to fetch the current details it needs.

Order Service publishes an event with only orderId 42 to an event bus; Delivery Service receives it and calls Order Service back with GET /orders/42 Order Service publishes an event with only orderId 42 to an event bus; Delivery Service receives it and calls Order Service back with GET /orders/42
Event with an identifier: the event carries only orderId 42, so Delivery Service calls Order Service back with GET /orders/42 for the details · Made with Akriti
  • Key benefits: Tiny payloads, easy schema stability, and built-in access control (the sender’s API enforces authorization and returns only what that specific caller is allowed to see).
  • When it fits: When the receiver only cares about the latest state of an entity (not every intermediate change), when the entity contains sensitive/large data, or when the sender stores a full event log.
  • Drawbacks:
    • Extra API call and temporal coupling: If the sender is down or overloaded when a burst of events fires, consumers cannot fetch the details (a “thundering herd” of callbacks).
    • Stale / race-condition reads: The entity’s state may change between when the event was emitted and when the receiver reads it. For example, in a credit-card rewards service that grants a bonus when an account’s available balance crosses a threshold, a subsequent transaction might already have altered the balance before the callback arrives.

Comparison: Event with Detail vs. Event with ID

Dimension Event with Detail (Fat Event) Event with Identifier (Thin Event)
Extra callback to sender None — self-contained Required (GET /resource/{id})
Runtime temporal coupling None during consumption High — sender API must be up to serve callbacks
State freshness Exact point-in-time snapshot when event happened Latest state at the moment the consumer fetches it
Payload size & schema coupling Larger; schema changes need careful versioning Tiny; minimal schema to break
Security / PII control Harder — every subscriber sees the full payload Easier — sender API authorizes per caller

Whichever style you choose, saving to the DB and then publishing the event is a dual write: crashing between the two loses the event. Guard against it with the Transactional Outbox pattern described in Temporal Coupling.

Where Event Messages Are Used

  • Fire-and-forget fan-out: Publishing OrderCreated once so Delivery, Billing, Search, and Analytics react independently without modifying the Order Service (reducing domain coupling).
  • Choreography-based Sagas: Services coordinate a multi-step business workflow without a central orchestrator — each service listens for the previous service’s domain event and emits its own event when finished.
  • Maintaining read replicas / caches: Keeping local read models up to date asynchronously so services never need to query another team’s database directly (avoiding common coupling).

FAQs

Should I default to Event with Detail or Event with Identifier? Start with a lean Event with Detail: include the stable core facts most subscribers need (IDs, amounts, status, timestamps) without dumping every internal column. Switch to an Event with Identifier when the data is very large, highly sensitive (strict per-caller authorization), or when consumers strictly want the latest live state.
How is an event message different from a command message? An event is named in the past tense (OrderCreated), has no single target, and cannot be rejected because it already happened. A command message is imperative (CREATE_SHIPMENT), targets one specific service, and asks it to perform an action.
Can an event message be processed out of order? Yes, unless you partition messages by entity key (such as orderId in the message header). Including a monotonic version or sequenceNumber in the event also lets consumers safely ignore older events that arrive late.