Github user benqiu2016 commented on a diff in the pull request: https://github.com/apache/nifi-minifi-cpp/pull/114#discussion_r123526843 --- Diff: libminifi/src/RemoteProcessorGroupPort.cpp --- @@ -54,19 +57,29 @@ bool create = true) { std::unique_ptr<Site2SiteClientProtocol> nextProtocol = nullptr; if (!available_protocols_.try_dequeue(nextProtocol)) { if (create) { + refreshPeerList(); // create - nextProtocol = std::unique_ptr<Site2SiteClientProtocol>(new Site2SiteClientProtocol(nullptr)); - nextProtocol->setPortId(protocol_uuid_); - std::unique_ptr<org::apache::nifi::minifi::io::DataStream> str = std::unique_ptr<org::apache::nifi::minifi::io::DataStream>(stream_factory_->createSocket(host_, port_)); - std::unique_ptr<Site2SitePeer> peer_ = std::unique_ptr<Site2SitePeer>(new Site2SitePeer(std::move(str), host_, port_)); - nextProtocol->setPeer(std::move(peer_)); + for (auto peer : site2site_peer_status_list_) { --- End diff -- i want to prepopulate to reduce the time to establish the socket/negotiation. Also we need to round robin them.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---