hachikuji commented on a change in pull request #9850: URL: https://github.com/apache/kafka/pull/9850#discussion_r555227878
########## File path: core/src/main/scala/kafka/server/KafkaApis.scala ########## @@ -3242,6 +3209,133 @@ class KafkaApis(val requestChannel: RequestChannel, } } + def handleEnvelope(request: RequestChannel.Request): Unit = { + val envelope = request.body[EnvelopeRequest] + + if (!config.metadataQuorumEnabled) { + // If forwarding is not yet enabled, we treat the request as unparsable and close the connection + closeConnection(request, Collections.emptyMap()) + return + } else if (!request.context.fromPrivilegedListener) { + sendErrorResponseMaybeThrottle(request, new ClusterAuthorizationException( Review comment: Makes sense. Initially I was doing a match on the result and returning directly, but it was verbose and awkward. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org