stanislavkozlovski commented on a change in pull request #7498: URL: https://github.com/apache/kafka/pull/7498#discussion_r521999932
########## File path: clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java ########## @@ -659,6 +655,12 @@ else if (error == Errors.CLUSTER_AUTHORIZATION_FAILED) this.accumulator.unmutePartition(batch.topicPartition); } + private String formatErrMsg(ProduceResponse.PartitionResponse response) { Review comment: I'm wondering if we should print an error message even if one is not provided - we could get the default error message from the `ApiException` linked to the `Errors`. An example would be for the OUT_OF_ORDER_SEQUENCE_NUMBER case: Without the change: ``` [2020-11-12 11:26:26,775] WARN Got error produce response with correlation id 2 on topic-partition test-0, retrying (2147483646 attempts left). Error: OUT_OF_ORDER_SEQUENCE_NUMBER.(org.apache.kafka.clients.producer.internals.Sender:610) ``` ``` [2020-11-12 11:26:26,775] WARN Got error produce response with correlation id 2 on topic-partition test-0, retrying (2147483646 attempts left). Error: OUT_OF_ORDER_SEQUENCE_NUMBER. Error Message: The broker received an out of order sequence number. (org.apache.kafka.clients.producer.internals.Sender:610) ``` ---------------------------------------------------------------- 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