@@ -47,10 +47,9 @@ auto BinaryProtoLookupService::findBroker(const std::string& address, bool autho
4747 }
4848
4949 // NOTE: we can use move capture for topic since C++14
50- cnxPool_.getRandomConnectionAsync (address).addListener ([this , promise, topic, address, authoritative,
51- redirectCount](
52- Result result,
53- const ClientConnectionWeakPtr& weakCnx) {
50+ cnxPool_.getConnectionAsync (address).addListener ([this , promise, topic, address, authoritative,
51+ redirectCount](Result result,
52+ const ClientConnectionWeakPtr& weakCnx) {
5453 if (result != ResultOk) {
5554 promise->setFailed (result);
5655 return ;
@@ -110,7 +109,7 @@ Future<Result, LookupDataResultPtr> BinaryProtoLookupService::getPartitionMetada
110109 }
111110 std::string lookupName = topicName->toString ();
112111 const auto address = serviceNameResolver_.resolveHost ();
113- cnxPool_.getRandomConnectionAsync (address, address)
112+ cnxPool_.getConnectionAsync (address, address)
114113 .addListener (std::bind (&BinaryProtoLookupService::sendPartitionMetadataLookupRequest, this ,
115114 lookupName, std::placeholders::_1, std::placeholders::_2, promise));
116115 return promise->getFuture ();
@@ -163,7 +162,7 @@ Future<Result, NamespaceTopicsPtr> BinaryProtoLookupService::getTopicsOfNamespac
163162 return promise->getFuture ();
164163 }
165164 std::string namespaceName = nsName->toString ();
166- cnxPool_.getRandomConnectionAsync (serviceNameResolver_.resolveHost ())
165+ cnxPool_.getConnectionAsync (serviceNameResolver_.resolveHost ())
167166 .addListener (std::bind (&BinaryProtoLookupService::sendGetTopicsOfNamespaceRequest, this ,
168167 namespaceName, mode, std::placeholders::_1, std::placeholders::_2, promise));
169168 return promise->getFuture ();
@@ -177,7 +176,7 @@ Future<Result, SchemaInfo> BinaryProtoLookupService::getSchema(const TopicNamePt
177176 promise->setFailed (ResultInvalidTopicName);
178177 return promise->getFuture ();
179178 }
180- cnxPool_.getRandomConnectionAsync (serviceNameResolver_.resolveHost ())
179+ cnxPool_.getConnectionAsync (serviceNameResolver_.resolveHost ())
181180 .addListener (std::bind (&BinaryProtoLookupService::sendGetSchemaRequest, this , topicName->toString (),
182181 version, std::placeholders::_1, std::placeholders::_2, promise));
183182
0 commit comments