Package akka.javasdk.annotations
Annotation Interface Consume.FromEventSourcedEntity
- Enclosing class:
Consume
@Target(TYPE)
@Retention(RUNTIME)
@Documented
public static @interface Consume.FromEventSourcedEntity
Annotation for consuming events from an
EventSourcedEntity
.
The underlying method must be declared to receive one parameter for the received events. Use one method with the common event type as parameter, or several methods with different parameter types corresponding to different event types.
-
Required Element Summary
Modifier and TypeRequired ElementDescriptionClass
<? extends EventSourcedEntity<?, ?>> Assign the class type of the entity one intends to consume from, which must extendEventSourcedEntity
. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
This option is only available for classes.
-
Element Details
-
value
Class<? extends EventSourcedEntity<?,?>> valueAssign the class type of the entity one intends to consume from, 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
-