AndrewJSchofield commented on code in PR #18672: URL: https://github.com/apache/kafka/pull/18672#discussion_r1933574562
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/Acknowledgements.java: ########## @@ -115,25 +120,26 @@ public int size() { * @return Whether the acknowledgements were sent to the broker and a response received */ public boolean isCompleted() { - return acknowledgeErrorCode != null; + return completed; } /** - * Set the acknowledgement error code when the response has been received from the broker. + * Set the acknowledgement exception when the response has been received from the broker. * - * @param acknowledgeErrorCode the error code + * @param acknowledgeException the exception (will be null if successful) */ - public void setAcknowledgeErrorCode(Errors acknowledgeErrorCode) { - this.acknowledgeErrorCode = acknowledgeErrorCode; + public void setAcknowledgeException(KafkaException acknowledgeException) { + completed = true; + this.acknowledgeException = acknowledgeException; } /** - * Get the acknowledgement error code when the response has been received from the broker. + * Get the acknowledgement exception when the response has been received from the broker. * * @return the error code */ - public Errors getAcknowledgeErrorCode() { - return acknowledgeErrorCode; + public KafkaException getAcknowledgeException() { Review Comment: In public classes, yes, I agree. However, here there are many accessor methods already present and I don't think renaming them all improves things. -- 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