Class PartialRoundRobinMessageRouterImpl
- java.lang.Object
-
- org.apache.pulsar.client.impl.customroute.PartialRoundRobinMessageRouterImpl
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.pulsar.client.api.MessageRouter
public class PartialRoundRobinMessageRouterImpl extends java.lang.Object implements org.apache.pulsar.client.api.MessageRouter- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PartialRoundRobinMessageRouterImpl(int numPartitionsLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intchoosePartition(org.apache.pulsar.client.api.Message<?> msg, org.apache.pulsar.client.api.TopicMetadata metadata)Choose a partition based on the topic metadata.
-
-
-
Method Detail
-
choosePartition
public int choosePartition(org.apache.pulsar.client.api.Message<?> msg, org.apache.pulsar.client.api.TopicMetadata metadata)Choose a partition based on the topic metadata. Key hash routing isn't supported.- Specified by:
choosePartitionin interfaceorg.apache.pulsar.client.api.MessageRouter- Parameters:
msg- messagemetadata- topic metadata- Returns:
- the partition to route the message.
-
-