docs: private JSONObject publishHostId(
              InetSocketAddress hostAddr,
              MessagingChannel messagingChannel,
              Set<String> activeVersions) throws Exception
      {
          JSONObject jsObj = new JSONObject();
          jsObj.put(TYPE, ConnectionType.PUBLISH_HOSTID.name());
          jsObj.put(HOST_ID, m_localHostId);
          jsObj.put(PORT, m_internalPort);
          jsObj.put(ADDRESS,
                  m_internalInterface.isEmpty() ? m_reportedInternalInterface : m_internalInterface);
          jsObj.put(VERSION_STRING, m_acceptor.getVersionChecker().getVersionString());
  
          jsObj = m_acceptor.decorate(jsObj, Optional.empty());
          jsObj.put(MAY_EXCHANGE_TS, true);
  
          byte[] jsBytes = jsObj.toString(4).getBytes(StandardCharsets.UTF_8);
          ByteBuffer pushHostId = ByteBuffer.allocate(4 + jsBytes.length);
          pushHostId.putInt(jsBytes.length);
          pushHostId.put(jsBytes).flip();
          messagingChannel.writeMessage(pushHostId);
  
          // read the json response from socketjoiner with version info and validate it
          return processJSONResponse(messagingChannel, activeVersions, true);
      }