@Internal public interface PulsarSubscriber extends Serializable
Regex
.
The PulsarSubscriber provides a unified interface for the Pulsar source to support all these two types of subscribing mode.
Modifier and Type | Method and Description |
---|---|
Set<TopicPartition> |
getSubscribedTopicPartitions(org.apache.pulsar.client.admin.PulsarAdmin pulsarAdmin,
RangeGenerator rangeGenerator,
int parallelism)
Get a set of subscribed
TopicPartition s. |
static PulsarSubscriber |
getTopicListSubscriber(List<String> topics) |
static PulsarSubscriber |
getTopicPatternSubscriber(Pattern topicPattern,
org.apache.pulsar.client.api.RegexSubscriptionMode subscriptionMode) |
Set<TopicPartition> getSubscribedTopicPartitions(org.apache.pulsar.client.admin.PulsarAdmin pulsarAdmin, RangeGenerator rangeGenerator, int parallelism)
TopicPartition
s. The method could throw IllegalStateException
, an extra try catch is required.pulsarAdmin
- The admin interface used to retrieve subscribed topic partitions.rangeGenerator
- The range for different partitions.parallelism
- The parallelism of flink source.TopicPartition
for each pulsar topic partition.static PulsarSubscriber getTopicListSubscriber(List<String> topics)
static PulsarSubscriber getTopicPatternSubscriber(Pattern topicPattern, org.apache.pulsar.client.api.RegexSubscriptionMode subscriptionMode)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.