Interface RoutingStrategy

All Known Implementing Classes:
AbstractRoutingStrategy, AnnotationRoutingStrategy, MetaDataRoutingStrategy, UnresolvedRoutingKeyPolicy

public interface RoutingStrategy
Interface describing a mechanism that generates a routing key for a given command. Commands that should be handled by the same segment, should result in the same routing key.
Since:
2.0
Author:
Allard Buijze
  • Method Summary

    Modifier and Type
    Method
    Description
    Generates a routing key for the given command.
  • Method Details

    • getRoutingKey

      String getRoutingKey(@Nonnull CommandMessage<?> command)
      Generates a routing key for the given command. Commands that should be handled by the same segment, should result in the same routing key.
      Parameters:
      command - the command to create a routing key for
      Returns:
      the routing key for the command