StreamPartitioner¶
StreamPartitioner<K, V> is an abstraction of partitioners that determine how records are distributed among the partitions in a Kafka topic.
Contract¶
partition¶
Integer partition(
String topic,
K key,
V value,
int numPartitions)
Used when:
RecordCollectorImplis requested to send a recordStreamsMetadataStateis requested to getKeyQueryMetadataForKey
Implementations¶
DefaultStreamPartitionerWindowedStreamPartitioner