Class PartialRoundRobinMessageRouterImpl

java.lang.Object
org.apache.pulsar.client.impl.customroute.PartialRoundRobinMessageRouterImpl
All Implemented Interfaces:
Serializable, MessageRouter

public class PartialRoundRobinMessageRouterImpl extends Object implements MessageRouter
See Also:
  • Constructor Details

    • PartialRoundRobinMessageRouterImpl

      public PartialRoundRobinMessageRouterImpl(int numPartitionsLimit)
  • Method Details

    • choosePartition

      public int choosePartition(Message<?> msg, TopicMetadata metadata)
      Choose a partition based on the topic metadata. Key hash routing isn't supported.
      Specified by:
      choosePartition in interface MessageRouter
      Parameters:
      msg - message
      metadata - topic metadata
      Returns:
      the partition to route the message.