mimaison commented on a change in pull request #11467:
URL: https://github.com/apache/kafka/pull/11467#discussion_r749454721



##########
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

Review comment:
       `The default "all" setting` -> `The default setting "all"`

##########
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

Review comment:
       `We have specified <code>retries</code> default as Integer.MAX_VALUE, 
and` -> `The <code>retries</code> setting defaults to 
<code>Integer.MAX_VALUE</code>, and`

##########
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

Review comment:
       I think `record sends` reads better

##########
File path: 
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
##########
@@ -156,7 +155,7 @@
  * to multiple partitions (and topics!) atomically.
  * </p>
  * <p>
- * To enable idempotence, the <code>enable.idempotence</code> configuration 
must be set to true. If set, the
+ * In Kafka 3.0, the <code>enable.idempotence</code> configuration is default 
to true. When enabling idempotence,

Review comment:
       `In Kafka 3.0,` -> `From Kafka 3.0,`
   `is default to true` -> `defaults to true`

##########
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:
       With the idempotent producer, even if 
`max.in.flight.requests.per.connection` is > 1, the order is still guaranteed.




-- 
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


Reply via email to