public int size() {
        if (this.size == SIZE_NOT_INITIALIZED) {
            this.size = size(new ObjectSerializationCache());
        }
        return size;
    }
Returns the size of {@link ResponseHeader} in bytes.

Calls to this method are idempotent and inexpensive since it returns the cached value of size after the first
invocation.
clients/src/main/java/org/apache/kafka/common/requests/ResponseHeader.java