Annotation Interface Consume.StartFrom

Enclosing class:
Consume

@Target(TYPE) @Retention(RUNTIME) @Documented public static @interface Consume.StartFrom
Where a Consumer starts when it is deployed for the first time.

Without this annotation a new consumer processes the whole history of its source. With latest it starts from the time of its first deployment, with timestamp it starts from the given point in time. Exactly one of the two must be set. Events and state changes from before the start point are not consumed.

Supported for consumers of Event Sourced Entities, Key Value Entities, Workflows and service to service event streams. Not supported for consumers of message broker topics.

The start point is recorded on the first deployment and is permanent. The service refuses to start if it is removed or changed, except that a timestamp can change to latest. To start over from a different point, give the consumer a new component id.

See the "Consuming and producing" page of the Akka SDK documentation for details, including the behavior in development mode and in tests.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Start from the time of the first deployment of the consumer.
    Start from a point in time, an ISO-8601 instant such as "2026-10-01T00:00:00Z".
  • Element Details

    • latest

      boolean latest
      Start from the time of the first deployment of the consumer.
      Default:
      false
    • timestamp

      String timestamp
      Start from a point in time, an ISO-8601 instant such as "2026-10-01T00:00:00Z".
      Default:
      ""