public int totalSize() {
        return totalSize;
    }
Get the total size of the message.

@return total size in bytes
clients/src/main/java/org/apache/kafka/common/protocol/MessageSizeAccumulator.java