Interface IStreamPartitioner<K, V>
Listener for Kafka StreamPartitioner. Extends IJVMBridgeBase
public interface IStreamPartitioner<K, V> : IJVMBridgeBase, IJVMBridgeDefinition
Type Parameters
KThe data associated to the event
VThe data associated to the event
- Inherited Members
Methods
Partition(String, K, V, int)
Executes the StreamPartitioner action in the CLR
int Partition(String topic, K key, V value, int numPartitions)
Parameters
topicStringThe StreamPartitioner object
keyKThe StreamPartitioner object
valueVThe StreamPartitioner object
numPartitionsintThe StreamPartitioner object
Returns
- int
an integer between 0 and
numPartitions-1, or -1 if the default partitioning logic should be used
Partitions(String, K, V, int)
Executes the StreamPartitioner action in the CLR
Optional<Set<Integer>> Partitions(String topic, K key, V value, int numPartitions)
Parameters
topicStringThe StreamPartitioner object
keyKThe StreamPartitioner object
valueVThe StreamPartitioner object
numPartitionsintThe StreamPartitioner object