mimaison commented on a change in pull request #10743: URL: https://github.com/apache/kafka/pull/10743#discussion_r657856869
########## File path: clients/src/main/java/org/apache/kafka/common/requests/FindCoordinatorResponse.java ########## @@ -95,4 +96,21 @@ public static FindCoordinatorResponse prepareResponse(Errors error, Node node) { .setPort(node.port()); return new FindCoordinatorResponse(data); } + + public static FindCoordinatorResponse prepareResponse(Errors error, String key, Node node) { + FindCoordinatorResponseData data = new FindCoordinatorResponseData(); + data.setCoordinators(Collections.singletonList( + new FindCoordinatorResponseData.Coordinator() + .setErrorCode(error.code()) + .setErrorMessage(error.message()) + .setKey(key) + .setHost(node.host()) + .setPort(node.port()) + .setNodeId(node.id()))); + return new FindCoordinatorResponse(data); + } + + public static boolean isBatch(RequestHeader header) { + return header.apiVersion() >= 4; + } Review comment: Right, deleted -- 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