Package kalix.javasdk.annotations
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
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
This option is only available for classes.
-
Element Details
-
value
Class<? extends kalix.javasdk.eventsourcedentity.EventSourcedEntity<?,?>> valueAssign the class type of the entity one intends to subscribe to, which must extendEventSourcedEntity
. -
ignoreUnknown
boolean ignoreUnknownThis 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
-