Annotation Interface Aggregate


  • Element Details

    • eventSourced

      boolean eventSourced
      Default:
      true
    • ignoreUnknownEvents

      boolean ignoreUnknownEvents
      Default:
      false
    • snapshotPeriod

      int snapshotPeriod
      Default:
      0
    • cached

      boolean cached
      Default:
      true
    • commitInBatch

      boolean commitInBatch
      Default:
      true
    • eventPublication

      EventPublication eventPublication
      Setting to control event publication.

      Use @Aggregate(eventPublication = IF_MODIFIED) to stop events from being published if the aggregate does not change, removing the need for dedicated InterceptApply methods for this.

      Use @Aggregate(eventPublication = NEVER) to prevent event publication altogether. This is useful because it allows command application on aggregates with eventSourcing = false without giving rise to events.

      Default:
      ALWAYS
    • publicationStrategy

      EventPublicationStrategy publicationStrategy
      Setting that determines what happens to published events. Note that eventPublication() is checked first to determine if an applied event should be published at all. Only then is checked how the events are to be published given the strategy.
      Default:
      STORE_AND_PUBLISH
    • searchable

      boolean searchable
      Default:
      false
    • collection

      String collection
      Default:
      ""
    • timestampPath

      String timestampPath
      Default:
      ""