Class RoutingKeyEventTargetMatcher<E>

java.lang.Object
org.axonframework.modelling.entity.annotation.RoutingKeyEventTargetMatcher<E>
Type Parameters:
E - The type of the child entity this matcher matches against.
All Implemented Interfaces:
EventTargetMatcher<E>

public class RoutingKeyEventTargetMatcher<E> extends Object implements EventTargetMatcher<E>
EventTargetMatcher implementation that matches based on the routing key. If the routing key of the message matches the routing key of the child entity, the child entity is considered a match.

Note: This class was known as {code org.axonframework.modelling.command.ForwardMatchingInstances} before version 5.0.0.

Since:
3.1.0
Author:
Steven van Beelen, Mitchell Herrijgers
  • Constructor Details

    • RoutingKeyEventTargetMatcher

      public RoutingKeyEventTargetMatcher(@Nonnull AnnotatedEntityMetamodel<E> metamodel, @Nonnull String entityRoutingProperty, @Nonnull String messageRoutingProperty)
      Constructs a RoutingKeyEventTargetMatcher that matches the routing key of the given entity against the routing key of an event message. The routing key of the entity is determined by the entityRoutingProperty and the routing key of the event message is determined by the messageRoutingProperty.
      Parameters:
      metamodel - The AnnotatedEntityMetamodel of the entity to match against.
      entityRoutingProperty - The routing key property of the entity, which is used to match against the message.
      messageRoutingProperty - The routing key property of the message, which is used to match against the entity.
  • Method Details