Interface BrokerSelectionStrategy

All Known Implementing Classes:
LeastResourceUsageWithWeight

@Evolving public interface BrokerSelectionStrategy
The broker selection strategy is designed to select the broker according to different implementations.
  • Method Summary

    Modifier and Type
    Method
    Description
    select(Set<String> brokers, org.apache.pulsar.common.naming.ServiceUnitId bundle, LoadManagerContext context)
    Choose an appropriate broker according to different load balancing implementations.
  • Method Details

    • select

      Optional<String> select(Set<String> brokers, org.apache.pulsar.common.naming.ServiceUnitId bundle, LoadManagerContext context)
      Choose an appropriate broker according to different load balancing implementations.
      Parameters:
      brokers - The candidate brokers list.
      bundle - The input bundle to select the owner broker
      context - The context contains information needed for selection (load data, config, and etc).