@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ApiMessageAndVersion that = (ApiMessageAndVersion) o;
        return version == that.version &&
            Objects.equals(message, that.message);
    }
An ApiMessage and an associated version.
server-common/src/main/java/org/apache/kafka/server/common/ApiMessageAndVersion.java