lucasbru commented on code in PR #18981:
URL: https://github.com/apache/kafka/pull/18981#discussion_r2304660782


##########
core/src/main/scala/kafka/server/AutoTopicCreationManager.scala:
##########
@@ -83,9 +89,30 @@ class DefaultAutoTopicCreationManager(
     uncreatableTopicResponses ++ creatableTopicResponses
   }
 
+  override def createStreamsInternalTopics(
+    topics: Map[String, CreatableTopic],
+    requestContext: RequestContext
+  ): Unit = {
+
+    for ((_, creatableTopic) <- topics) {
+      if (creatableTopic.numPartitions() == -1) {
+        creatableTopic
+          .setNumPartitions(config.numPartitions)
+      }
+      if (creatableTopic.replicationFactor() == -1) {
+        creatableTopic
+          .setReplicationFactor(config.defaultReplicationFactor.shortValue)
+      }
+    }

Review Comment:
   @brandboat You are right. We could remove this. I guess I was doing it 
because `creatableTopic` does the same (in the default cause). Would you want 
to submit a PR to remove it or should I?



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