apoorvmittal10 commented on code in PR #14699: URL: https://github.com/apache/kafka/pull/14699#discussion_r1391634085
########## clients/src/main/java/org/apache/kafka/common/requests/PushTelemetryRequest.java: ########## @@ -71,6 +73,31 @@ public PushTelemetryRequestData data() { return data; } + public PushTelemetryResponse createResponse(int throttleTimeMs, Errors errors) { + PushTelemetryResponseData responseData = new PushTelemetryResponseData(); + responseData.setErrorCode(errors.code()); + responseData.setThrottleTimeMs(throttleTimeMs); Review Comment: > Could we redirect getErrorResponse to here and rename it to errorResponse? Done > If error code is not ThrottlingQuotaExceededException, we should ignore throttleTimeMs. It might be naive but sorry I didn't understand as why throttleTimeMs should not be passed in response for other exceptions. Isn't all requests goes through common throttling code where requests might be throttled for sometime based on the throughput? -- 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