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 ElementsModifier and TypeOptional ElementDescriptionGet 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 routingKeyGet 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
routingKeyis especially useful for annotatedMethods, which typically have a different naming scheme than a field in a command/event.- Default:
""
-