kkonstantine commented on a change in pull request #11933:
URL: https://github.com/apache/kafka/pull/11933#discussion_r832885910



##########
File path: 
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java
##########
@@ -648,6 +648,14 @@ private WorkerTask buildWorkerTask(ClusterConfigState 
configState,
         // These settings will execute infinite retries on retriable 
exceptions. They *may* be overridden via configs passed to the worker,
         // but this may compromise the delivery guarantees of Kafka Connect.
         producerProps.put(ProducerConfig.MAX_BLOCK_MS_CONFIG, 
Long.toString(Long.MAX_VALUE));
+        // By default, producers that are instantiated and used by Connect 
have idempotency disabled even after idempotency became
+        // default for Kafka producers. This is chosen to avoid breaking 
changes when Connect contacts Kafka brokers that do not support
+        // idempotent producers or require explicit steps to enable them (e.g. 
adding the IDEMPOTENT_WRITE ACL to brokers older than 2.8).
+        // These settings might change when 
https://cwiki.apache.org/confluence/display/KAFKA/KIP-318%3A+Make+Kafka+Connect+Source+idempotent
+        // gets approved and scheduled for release.
+        producerProps.put(ProducerConfig.ENABLE_IDEMPOTENCE_CONFIG, "false");
+        producerProps.put(ProducerConfig.ACKS_CONFIG, "all");
+        
producerProps.put(ProducerConfig.MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION, "1");

Review comment:
       I had included the other commit on purpose given that both PRs went out 
at the same time in order to present the same final outcome. I have rebased in 
the meantime after merging https://github.com/apache/kafka/pull/11932




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