Architecturedomain eventpublic event

Integration event

Definition

An integration event is a message, named in the past tense, that one module or service publishes for others after a state change commits; it belongs to the publisher's public contract.

In practice

Integration events let a module react to another without the publisher knowing its subscribers: Orders publishes OrderPlaced and Shipping and Notifications subscribe. In a modular monolith they travel over an in-process bus; between services, over a broker.

Unlike internal domain events, they are a versioned contract, so keep them small and stable and avoid exposing internal fields. An in-memory bus loses events if the process stops between commit and dispatch; store them with a transactional outbox when they must not be lost, and make subscribers idempotent.

Example

After the order commits, Orders publishes OrderPlaced { OrderId, CustomerId, Total, Version: 1 }; Shipping creates a shipment and Loyalty adds points, each handling duplicates by OrderId.