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:
RecordCollectorImpl
is requested to send a recordStreamsMetadataState
is requested to getKeyQueryMetadataForKey
Implementations¶
DefaultStreamPartitioner
WindowedStreamPartitioner