showuon commented on a change in pull request #11467: URL: https://github.com/apache/kafka/pull/11467#discussion_r750961137
########## File path: clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java ########## @@ -117,15 +115,16 @@ * as well as a background I/O thread that is responsible for turning these records into requests and transmitting them * to the cluster. Failure to close the producer after use will leak these resources. * <p> - * The {@link #send(ProducerRecord) send()} method is asynchronous. When called it adds the record to a buffer of pending record sends + * The {@link #send(ProducerRecord) send()} method is asynchronous. When called, it adds the record to a buffer of pending sending record * and immediately returns. This allows the producer to batch together individual records for efficiency. * <p> - * The <code>acks</code> config controls the criteria under which requests are considered complete. The "all" setting - * we have specified will result in blocking on the full commit of the record, the slowest but most durable setting. + * The <code>acks</code> config controls the criteria under which requests are considered complete. The default "all" setting + * will result in blocking on the full commit of the record, the slowest but most durable setting. * <p> - * If the request fails, the producer can automatically retry, though since we have specified <code>retries</code> - * as 0 it won't. Enabling retries also opens up the possibility of duplicates (see the documentation on - * <a href="http://kafka.apache.org/documentation.html#semantics">message delivery semantics</a> for details). + * If the request fails, the producer can automatically retry. We have specified <code>retries</code> default as Integer.MAX_VALUE, and + * it's recommended to use <code>delivery.timeout.ms</code> to control retry behavior, instead of <code>retries</code>. + * Note that allowing retries without setting <code>max.in.flight.requests.per.connection</code> to 1 opens up the possibility Review comment: Ah, right, the whole `Note` section only applied for `idempotent` disabled case, but I don't think we should mention it here. Remove them. -- 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