Interface EventSourcedEntityOptions

All Superinterfaces:
kalix.javasdk.impl.ComponentOptions, EntityOptions

public interface EventSourcedEntityOptions extends EntityOptions
Root entity options for all event sourcing entities.
  • Method Details

    • snapshotEvery

      int snapshotEvery()
    • withSnapshotEvery

      EventSourcedEntityOptions withSnapshotEvery(int numberOfEvents)
      Specifies how snapshots of the entity state should be made: Zero means use default from configuration file. Any negative value means never snapshot. Any positive value means snapshot at-or-after that number of events.

      It is strongly recommended to not disable snapshotting unless it is known that event sourced entity will never have more than 100 events (in which case the default will anyway not trigger any snapshots)

    • withForwardHeaders

      EventSourcedEntityOptions withForwardHeaders(Set<String> headers)
      Description copied from interface: EntityOptions
      Ask Kalix to forward these headers from the incoming request as metadata headers for the incoming commands. By default, no headers except "X-Server-Timing" are forwarded.
      Specified by:
      withForwardHeaders in interface kalix.javasdk.impl.ComponentOptions
      Specified by:
      withForwardHeaders in interface EntityOptions
    • defaults

      static EventSourcedEntityOptions defaults()
      Create a default entity option for an event sourced entity.
      the entity option