C0urante commented on a change in pull request #11775:
URL: https://github.com/apache/kafka/pull/11775#discussion_r820931108



##########
File path: 
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/SourceConnectorConfig.java
##########
@@ -47,6 +57,57 @@
             + "created by source connectors";
     private static final String TOPIC_CREATION_GROUPS_DISPLAY = "Topic 
Creation Groups";
 
+    protected static final String EXACTLY_ONCE_SUPPORT_GROUP = "Exactly Once 
Support";
+
+    public enum ExactlyOnceSupportLevel {
+        REQUESTED,
+        REQUIRED;
+
+        public static ExactlyOnceSupportLevel fromProperty(String property) {
+            return valueOf(property.toUpperCase(Locale.ROOT).trim());
+        }
+
+        @Override
+        public String toString() {
+            return name().toLowerCase(Locale.ROOT);
+        }
+    }
+
+    public static final String EXACTLY_ONCE_SUPPORT_CONFIG = 
"exactly.once.support";
+    private static final String EXACTLY_ONCE_SUPPORT_DOC = "Permitted values 
are " + String.join(", ", enumOptions(ExactlyOnceSupportLevel.class)) + ". "
+            + "If set to \"" + REQUIRED + "\", forces a preflight check for 
the connector to ensure that it can provide exactly-once delivery "
+            + "with the given configuration. Some connectors may be capable of 
providing exactly-once delivery but not signal to "
+            + "Connect that they support this; in that case, documentation for 
the connector should be consulted carefully before "
+            + "creating it, and the value for this property should be set to 
\"" + REQUESTED + "\". "
+            + "Additionally, if the value is set to \"" + REQUIRED + "\" but 
the worker that performs preflight validation does not have "
+            + "exactly-once support enabled for source connectors, requests to 
create or validate the connector will fail.";
+    private static final String EXACTLY_ONCE_SUPPORT_DISPLAY = "Exactly once 
support";
+
+    public static final String TRANSACTION_BOUNDARY_CONFIG = 
SourceTask.TRANSACTION_BOUNDARY_CONFIG;
+    private static final String TRANSACTION_BOUNDARY_DOC = "Permitted values 
are: " + String.join(", ", enumOptions(TransactionBoundary.class)) + ". "
+            + "If set to '" + POLL + "', a new producer transaction will be 
started and committed for every batch of records that each task from "
+            + "this connector provides to Connect. If set to '" + CONNECTOR + 
"', relies on connector-defined transaction boundaries; note that "
+            + "not all connectors are capable of defining their own 
transaction boundaries, and in that case, attempts to instantiate a connector 
with "
+            + "this value will fail. Finally, if set to '" + INTERVAL + "', 
commits transactions only after a user-defined time interval has passed.";
+    private static final String TRANSACTION_BOUNDARY_DISPLAY = "Transaction 
Boundary";
+
+    public static final String TRANSACTION_BOUNDARY_INTERVAL_CONFIG = 
"transaction.boundary.interval.ms";
+    private static final String TRANSACTION_BOUNDARY_INTERVAL_DOC = "If '" + 
TRANSACTION_BOUNDARY_CONFIG + "' is set to '" + INTERVAL
+            + "', determines the interval for producer transaction commits by 
connector tasks. If unset, defaults to the value of the worker-level "
+            + "'" + WorkerConfig.OFFSET_COMMIT_INTERVAL_MS_CONFIG + "' 
property. Has no effect if a different "
+            + TRANSACTION_BOUNDARY_CONFIG + " is specified.";

Review comment:
       Ack, will change.




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