@Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("type=").append(messageType);
    sb.append("; payloadLength=").append(payloadLength);
    sb.append("; numberOfParts=").append(numberOfParts);
    sb.append("; hasSecurePart=").append(isSecureMode());
    sb.append("; transactionId=").append(transactionId);
    sb.append("; currentPart=").append(currentPart);
    sb.append("; messageModified=").append(messageModified);
    sb.append("; flags=").append(Integer.toHexString(flags));
    for (int i = 0; i < numberOfParts; i++) {
      sb.append("; part[").append(i).append("]={");
      sb.append(partsList[i]);
      sb.append("}");
    }
    return sb.toString();
  }
Gets rid of all the parts that have been added to this message.
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/Message.java