Interface RoutingStrategy

All Known Implementing Classes:
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.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.