@Experimental public class SingleClusterTopicMetadataService extends Object implements KafkaMetadataService
KafkaMetadataService that delegates metadata fetching to a single AdminClient,
which is scoped to a single cluster. The stream ids are equivalent to topics.| Constructor and Description |
|---|
SingleClusterTopicMetadataService(String kafkaClusterId,
Properties properties)
Create a
SingleClusterTopicMetadataService. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Map<String,KafkaStream> |
describeStreams(Collection<String> streamIds)
Get current metadata for queried streams.
|
Set<KafkaStream> |
getAllStreams()
Get current metadata for all streams.
|
boolean |
isClusterActive(String kafkaClusterId)
Check if the cluster is active.
|
public SingleClusterTopicMetadataService(String kafkaClusterId, Properties properties)
SingleClusterTopicMetadataService.kafkaClusterId - the id of the Kafka cluster.properties - the properties of the Kafka cluster.public Set<KafkaStream> getAllStreams()
getAllStreams in interface KafkaMetadataServicepublic Map<String,KafkaStream> describeStreams(Collection<String> streamIds)
describeStreams in interface KafkaMetadataServicestreamIds - stream full namespublic boolean isClusterActive(String kafkaClusterId)
isClusterActive in interface KafkaMetadataServicekafkaClusterId - Kafka cluster idpublic void close()
close in interface AutoCloseableCopyright © 2022–2024 The Apache Software Foundation. All rights reserved.