@PublicEvolving public interface KafkaSubscriber extends Serializable
Regex
.
The KafkaSubscriber provides a unified interface for the Kafka source to support all these three types of subscribing mode.
Modifier and Type | Method and Description |
---|---|
static KafkaSubscriber |
getPartitionSetSubscriber(Set<org.apache.kafka.common.TopicPartition> partitions) |
Set<org.apache.kafka.common.TopicPartition> |
getSubscribedTopicPartitions(org.apache.kafka.clients.admin.AdminClient adminClient)
Get a set of subscribed
TopicPartition s. |
static KafkaSubscriber |
getTopicListSubscriber(List<String> topics) |
static KafkaSubscriber |
getTopicPatternSubscriber(Pattern topicPattern) |
Set<org.apache.kafka.common.TopicPartition> getSubscribedTopicPartitions(org.apache.kafka.clients.admin.AdminClient adminClient)
TopicPartition
s.adminClient
- The admin client used to retrieve subscribed topic partitions.TopicPartition
sstatic KafkaSubscriber getTopicListSubscriber(List<String> topics)
static KafkaSubscriber getTopicPatternSubscriber(Pattern topicPattern)
static KafkaSubscriber getPartitionSetSubscriber(Set<org.apache.kafka.common.TopicPartition> partitions)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.