Annotation Interface AggregateIdentifier


@Target({FIELD,METHOD,ANNOTATION_TYPE}) @Retention(RUNTIME) @EntityId public @interface AggregateIdentifier
Field or Method annotation that identifies the member containing the identifier of the Aggregate.
Since:
2.0
Author:
Allard Buijze
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Deprecated.
    this field is no longer used to route commands to an aggregate.
  • Element Details

    • routingKey

      @Deprecated String routingKey
      Deprecated.
      this field is no longer used to route commands to an aggregate. The aggregate to route a command to will be resolved with the TargetAggregateIdentifier annotated field in the CommandMessage's payload itself.
      Get the name of the routing key property on commands and events that provides the identifier that should be used to target the aggregate root 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:
      ""