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

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends EventSourcedEntity<?,?>>
    Assign the class type of the entity one intends to consume from, 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 EventSourcedEntity<?,?>> value
      Assign the class type of the entity one intends to consume from, 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