public static PipeSubscribeSubscribeReq toTPipeSubscribeReq(final Set<String> topicNames)
      throws IOException {
    final PipeSubscribeSubscribeReq req = new PipeSubscribeSubscribeReq();

    req.topicNames = topicNames;

    req.version = PipeSubscribeRequestVersion.VERSION_1.getVersion();
    req.type = PipeSubscribeRequestType.SUBSCRIBE.getType();
    try (final PublicBAOS byteArrayOutputStream = new PublicBAOS();
        final DataOutputStream outputStream = new DataOutputStream(byteArrayOutputStream)) {
      ReadWriteIOUtils.writeObjectSet(topicNames, outputStream);
      req.body = ByteBuffer.wrap(byteArrayOutputStream.getBuf(), 0, byteArrayOutputStream.size());
    }

    return req;
  }
Serialize the incoming parameters into `PipeSubscribeSubscribeReq`, called by the subscription
client.
iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/subscription/payload/request/PipeSubscribeSubscribeReq.java