public class NamedTopicFilter extends Object implements TopicFilter
Filter that returns all partitions for the specified topics.
| Constructor and Description |
|---|
NamedTopicFilter(Set<String> topics)
Create filter based on a set of topic names.
|
NamedTopicFilter(String... topics)
Convenience constructor.
|
| Modifier and Type | Method and Description |
|---|---|
List<org.apache.kafka.common.TopicPartition> |
getFilteredTopicPartitions(org.apache.kafka.clients.consumer.KafkaConsumer<?,?> consumer)
Get the Kafka TopicPartitions passed by this filter.
|
String |
getTopicsString() |
public NamedTopicFilter(Set<String> topics)
Create filter based on a set of topic names.
topics - The topic names the filter will pass.public NamedTopicFilter(String... topics)
Convenience constructor.
topics - The topic names the filter will pass.public List<org.apache.kafka.common.TopicPartition> getFilteredTopicPartitions(org.apache.kafka.clients.consumer.KafkaConsumer<?,?> consumer)
TopicFilterGet the Kafka TopicPartitions passed by this filter.
getFilteredTopicPartitions in interface TopicFilterconsumer - The Kafka consumer to use to read the list of existing partitionspublic String getTopicsString()
getTopicsString in interface TopicFilterCopyright © 2019 The Apache Software Foundation. All Rights Reserved.