Interface RoutingInfo

All Known Implementing Classes:
RoutingInfo.DynamicRoutingInfo, RoutingInfo.StaticRoutingInfo

public interface RoutingInfo
Utility class that holds the current routing information. To be uses everywhere the number of partitions or message correlation strategy is needed.

The information always reflects the current persisted routing info from DbRoutingState.

  • Method Details

    • partitions

      Set<Integer> partitions()
      Returns the current set of partitions.
    • partitionForCorrelationKey

      int partitionForCorrelationKey(org.agrona.DirectBuffer correlationKey)
      Returns the current partition id for the given correlation key.
    • forStaticPartitions

      static RoutingInfo forStaticPartitions(int partitionCount)
      Creates a RoutingInfo instance for static partitions. This is used when the partitions are fixed and known at startup. Only relevant for testing.
    • dynamic

      static RoutingInfo dynamic(RoutingState routingState, RoutingInfo fallback)