m1a2st commented on code in PR #20384:
URL: https://github.com/apache/kafka/pull/20384#discussion_r3644428245


##########
connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaTopicBasedBackingStore.java:
##########
@@ -39,17 +42,35 @@ public abstract class KafkaTopicBasedBackingStore {
 
     Consumer<TopicAdmin> topicInitializer(String topic, NewTopic 
topicDescription, WorkerConfig config, Time time) {
         return admin -> {
-            log.debug("Creating Connect internal topic for {}", 
getTopicPurpose());
-            // Create the topic if it doesn't exist
-            Set<String> newTopics = createTopics(topicDescription, admin, 
config, time);
-            if (!newTopics.contains(topic)) {
-                // It already existed, so check that the topic cleanup policy 
is compact only and not delete
-                log.debug("Using admin client to check cleanup policy of '{}' 
topic is '{}'", topic, TopicConfig.CLEANUP_POLICY_COMPACT);
-                admin.verifyTopicCleanupPolicyOnlyCompact(topic, 
getTopicConfig(), getTopicPurpose());
+            if (config.internalTopicsCreationEnabled()) {
+                log.debug("Creating Connect internal topic for {}", 
getTopicPurpose());
+                // Create the topic if it doesn't exist
+                Set<String> newTopics = createTopics(topicDescription, admin, 
config, time);
+                if (!newTopics.contains(topic)) {
+                    verifyTopicConfig(topic, admin);
+                }
+            } else {
+                log.debug("Skipping creation of Connect internal topic for {} 
because automatic topic creation is disabled", getTopicPurpose());

Review Comment:
   When internal.topics.automatic.creation.enable=false, doesn't this also 
prevent Kafka Connect from automatically creating a custom 
offsets.storage.topic specified by the connector? The documentation only 
mentions the "offset, config, and status topics."



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to