public interface LookupService extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<org.apache.commons.lang3.tuple.Pair<InetSocketAddress,InetSocketAddress>> |
getBroker(TopicName topicName)
Calls broker lookup-api to get broker
InetSocketAddress which serves namespace bundle that contains given
topic. |
CompletableFuture<PartitionedTopicMetadata> |
getPartitionedTopicMetadata(TopicName topicName)
Returns
PartitionedTopicMetadata for a given topic. |
CompletableFuture<Optional<SchemaInfo>> |
getSchema(TopicName topicName) |
String |
getServiceUrl()
Returns broker-service lookup api url.
|
CompletableFuture<List<String>> |
getTopicsUnderNamespace(NamespaceName namespace,
PulsarApi.CommandGetTopicsOfNamespace.Mode mode)
Returns all the topics name for a given namespace.
|
void |
updateServiceUrl(String serviceUrl)
Instruct the LookupService to switch to a new service URL for all subsequent requests
|
closevoid updateServiceUrl(String serviceUrl) throws PulsarClientException
PulsarClientExceptionCompletableFuture<org.apache.commons.lang3.tuple.Pair<InetSocketAddress,InetSocketAddress>> getBroker(TopicName topicName)
InetSocketAddress which serves namespace bundle that contains given
topic.topicName - topic-nameCompletableFuture<PartitionedTopicMetadata> getPartitionedTopicMetadata(TopicName topicName)
PartitionedTopicMetadata for a given topic.topicName - topic-nameCompletableFuture<Optional<SchemaInfo>> getSchema(TopicName topicName)
String getServiceUrl()
CompletableFuture<List<String>> getTopicsUnderNamespace(NamespaceName namespace, PulsarApi.CommandGetTopicsOfNamespace.Mode mode)
namespace - : namespace-nameCopyright © 2017–2018 Apache Software Foundation. All rights reserved.