pyflink.datastream.connectors.pulsar.RangeGenerator#
- class RangeGenerator(j_range_generator)[source]#
A generator for generating the TopicRange for given topic. It was used for pulsar’s SubscriptionType#Key_Shared mode. TopicRange would be used in KeySharedPolicy for different pulsar source readers.
If you implement this interface, make sure that each TopicRange would be assigned to a specified source reader. Since flink parallelism is provided, make sure the pulsar message key’s hashcode is evenly distributed among these topic ranges.
Methods
fixed_key
([support_null_key, keys, ...])Pulsar didn't expose the key hash range method.
full
()Default implementation for SubscriptionType#Shared, SubscriptionType#Failover and SubscriptionType#Exclusive subscription.