skaundinya15 commented on a change in pull request #10743: URL: https://github.com/apache/kafka/pull/10743#discussion_r655921765
########## 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: This doesn't seem to be used anywhere, is this supposed to be there for convenience for the future? -- 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