ijuma commented on code in PR #18727: URL: https://github.com/apache/kafka/pull/18727#discussion_r1938136022
########## clients/src/main/java/org/apache/kafka/common/protocol/ApiKeys.java: ########## @@ -264,8 +273,11 @@ public boolean hasValidVersion() { return oldestVersion() <= latestVersion(); } - public Optional<ApiVersionsResponseData.ApiVersion> toApiVersion(boolean enableUnstableLastVersion) { - short oldestVersion = oldestVersion(); + public Optional<ApiVersionsResponseData.ApiVersion> toApiVersion(boolean enableUnstableLastVersion, + Optional<ApiMessageType.ListenerType> listenerType) { + // see `PRODUCE_MIN_VERSION` for details on why we do this + short oldestVersion = (this == PRODUCE && listenerType.map(l -> l == ApiMessageType.ListenerType.BROKER).orElse(false)) ? Review Comment: We're discussing this in the main discussion, so will resolve this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org