@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RequestHeader that = (RequestHeader) o;
        return headerVersion == that.headerVersion &&
            Objects.equals(data, that.data);
    }
Returns the size of {@link RequestHeader} 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/RequestHeader.java