Github user benqiu2016 commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/114#discussion_r126210180
  
    --- Diff: libminifi/src/RemoteProcessorGroupPort.cpp ---
    @@ -150,6 +194,87 @@ void 
RemoteProcessorGroupPort::onTrigger(core::ProcessContext *context, core::Pr
       return;
     }
     
    +void RemoteProcessorGroupPort::refreshRemoteSite2SiteInfo() {
    +  if (this->host_.empty() || this->port_ == -1 || this->protocol_.empty())
    +      return;
    +
    +  std::string fullUrl = this->protocol_ + this->host_ + ":" + 
std::to_string(this->port_) + "/nifi-api/controller/";
    --- End diff --
    
    the /nifi-api/controller return 
    it return the site2site port and we can use that to do the site2site 
negotiation with master to find the peer info
    {
      "revision": {
        "clientId": "d40fb824-070b-4547-9b1c-f50f5ba0a677"
      },
      "controller": {
        "id": "fe4a3a42-53b6-4af1-a80d-6fdfe60de97f",
        "name": "NiFi Flow",
        "comments": "",
        "runningCount": 3,
        "stoppedCount": 2,
        "invalidCount": 0,
        "disabledCount": 0,
        "inputPortCount": 1,
        "outputPortCount": 1,
        "remoteSiteListeningPort": 10001,
        "siteToSiteSecure": false,
        "instanceId": "9d841c51-ab00-422e-811c-53c6dc2f8e59",
        "inputPorts": [
          {
            "id": "471deef6-2a6e-4a7d-912a-81cc17e3a204",
            "name": " From Node A",
            "comments": "",
            "state": "RUNNING"
          }
        ],
        "outputPorts": [
          {
            "id": "75f88005-0a87-4fef-8320-6219cdbcf18b",
            "name": "To A",
            "comments": "",
            "state": "STOPPED"
          }
        ]
      }
    }


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to