Interface DomainEvent

All Superinterfaces:
Serializable
All Known Implementing Classes:
OrderPlacedEvent

public interface DomainEvent extends Serializable
Marker contract for events that describe something already decided by a module. Events are intentionally small immutable facts so other modules can react without reaching into the publisher's persistence model.
  • Method Summary

    Modifier and Type
    Method
    Description
    Stable event identifier useful for logging, tracing, and future idempotency concerns.
    Time at which the event fact was created.
  • Method Details

    • eventId

      UUID eventId()
      Stable event identifier useful for logging, tracing, and future idempotency concerns.
      Returns:
      unique event identifier
    • occurredAt

      Instant occurredAt()
      Time at which the event fact was created.
      Returns:
      event creation timestamp