IgnoreSourcing

interface IgnoreSourcing

Marker interface indicating that a domain event should be ignored during state aggregation and event sourcing.

Events implementing this interface are excluded from the normal event sourcing process, meaning they do not modify the aggregate's state or version. This is useful for publishing events that serve only as notifications or error signals without affecting the domain model's persistent state.

Use Cases: Publishing failure events when business validation fails during command processing, allowing downstream subscribers to react to errors without modifying aggregate state.

Trigger Conditions (all must be met):

Effects:

  • me.ahoo.wow.modeling.state.StateAggregate.onSourcing skips sourcing this event and doesn't change aggregate version

  • me.ahoo.wow.eventsourcing.state.SendStateEventFilter ignores uninitialized state aggregates for state event bus

  • Aggregate snapshot processors cannot receive this state event (not stored in snapshot repository)

See also

for error event marking

for regular domain events