Class PartialRoundRobinMessageRouterImpl
java.lang.Object
org.apache.pulsar.client.impl.customroute.PartialRoundRobinMessageRouterImpl
- All Implemented Interfaces:
Serializable
,MessageRouter
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
choosePartition
(Message<?> msg, TopicMetadata metadata) Choose a partition based on the topic metadata.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.pulsar.client.api.MessageRouter
choosePartition
-
Constructor Details
-
PartialRoundRobinMessageRouterImpl
public PartialRoundRobinMessageRouterImpl(int numPartitionsLimit)
-
-
Method Details
-
choosePartition
Choose a partition based on the topic metadata. Key hash routing isn't supported.- Specified by:
choosePartition
in interfaceMessageRouter
- Parameters:
msg
- messagemetadata
- topic metadata- Returns:
- the partition to route the message.
-