Annotation Interface Subscribe.EventSourcedEntity

Enclosing class:
Subscribe

@Target({METHOD,TYPE}) @Retention(RUNTIME) @Documented public static @interface Subscribe.EventSourcedEntity
Annotation for subscribing to updates from an Event-sourced Entity. The underlying method must be declared to receive one or two parameters:
  • when one parameter is passed, the single parameter will be considered the event type such method will handle;
  • when two parameters are passed, the first one will be considered the view state and the second one the event type.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends kalix.javasdk.eventsourcedentity.EventSourcedEntity<?,?>>
    Assign the class type of the entity one intends to subscribe to, which must extend EventSourcedEntity.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    This option is only available for classes.
  • Element Details

    • value

      Class<? extends kalix.javasdk.eventsourcedentity.EventSourcedEntity<?,?>> value
      Assign the class type of the entity one intends to subscribe to, which must extend EventSourcedEntity.
    • ignoreUnknown

      boolean ignoreUnknown
      This option is only available for classes. Using it in a method has no effect.

      When there is no method in the class whose input type matches the event type:

      • if ignoreUnknown is true the event is discarded
      • if false, an Exception is raised
      Default:
      false