Annotation Interface EntityId


Field or Method annotation that marks the member containing the identifier of an Entity. Commands for a child Entity are routed to the Entity if the value of the Command's routingKey() property matches the value of the annotated field.
Since:
3.0
Author:
Allard Buijze
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Get the name of the routing key property on commands and events that provides the identifier that should be used to target the entity with the annotated member.
  • Element Details

    • routingKey

      String routingKey
      Get the name of the routing key property on commands and events that provides the identifier that should be used to target the entity with the annotated member.

      Optional. If left empty this defaults to the member name. If the member was named in a "getter" style, the "get" will be removed.

      Setting the routingKey is especially useful for annotated Methods, which typically have a different naming scheme than a field in a command/event.

      Default:
      ""