Interface IStreamPartitioner<K, V>
Listener for Kafka StreamPartitioner. Extends IJVMBridgeBase
public interface IStreamPartitioner<K, V> : IJVMBridgeBase, IJVMBridgeDefinition
Type Parameters
K
The data associated to the event
V
The 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
topic
StringThe StreamPartitioner object
key
KThe StreamPartitioner object
value
VThe StreamPartitioner object
numPartitions
intThe 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
topic
StringThe StreamPartitioner object
key
KThe StreamPartitioner object
value
VThe StreamPartitioner object
numPartitions
intThe StreamPartitioner object