code: func SendChannelsList(channels []string, sendInbox, replyInbox string, nc *nats.Conn, serverID string) error {
  	// Since the NATS message payload is limited, we need to repeat
  	// requests if all channels can't fit in a request.
  	maxPayload := int(nc.MaxPayload())
  	// Reuse this request object to send the (possibly many) protocol message(s).
  	header := &spb.CtrlMsg{
  		ServerID: serverID,
  		MsgType:  spb.CtrlMsg_Partitioning,
  	}
  	// The Data field (a byte array) will require 1+len(array)+(encoded size of array).
  	// To be conservative, let's just use a 8 bytes integer
  	headerSize := header.Size() + 1 + 8
  	var (
  		bytes []byte // Reused buffer in which the request is to marshal info
  		n     int    // Size of the serialized request in the above buffer
  		count int    // Number of channels added to the request
  	)
  	for start := 0; start != len(channels); start += count {
  		bytes, n, count = encodeChannelsRequest(header, channels, bytes, headerSize, maxPayload, start)
  		if count == 0 {
  			return errors.New("message payload too small to send channels list")
  		}
  		if err := nc.PublishRequest(sendInbox, replyInbox, bytes[:n]); err != nil {
  			return err
  		}
  	}
  	return nc.Flush()
  }
docs: // SendsChannelsList sends the list of channels to the given subject, possibly
  // splitting the list in several requests if it cannot fit in a single message.