urbandan commented on code in PR #11565: URL: https://github.com/apache/kafka/pull/11565#discussion_r927368455
########## connect/runtime/src/main/java/org/apache/kafka/connect/util/TopicAdmin.java: ########## @@ -329,6 +334,48 @@ public Set<String> createTopics(NewTopic... topics) { return createOrFindTopics(topics).createdTopics(); } + /** + * Implements a retry logic around creating topic(s) in case it'd fail due to InvalidReplicationFactorException + * + * @param topicDescription + * @param config + * @param time + * @return the same as {@link TopicAdmin#createTopics(NewTopic...)} + */ + public Set<String> createTopicsWithRetry(NewTopic topicDescription, WorkerConfig config, Time time) { Review Comment: I would avoid passing a full WorkerConfig here, and try to minimalize the amount of data passed here by only propagating the timeout and the backoff. That simplifies testing, too. -- 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