Browse Source

ref(py): Clarify when kafka topics are created in local dev (#57414)

Evan Purkhiser 1 year ago
parent
commit
6a9556c24a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/sentry/utils/batching_kafka_consumer.py

+ 3 - 1
src/sentry/utils/batching_kafka_consumer.py

@@ -49,11 +49,13 @@ def wait_for_topics(admin_client: AdminClient, topics: List[str], timeout: int =
 
 
 def create_topics(cluster_name: str, topics: List[str], force: bool = False) -> None:
-    """If configured to do so, create topics and make sure that they exist
+    """
+    If configured to do so, create topics and make sure that they exist
 
     topics must be from the same cluster.
     """
     if settings.KAFKA_CONSUMER_AUTO_CREATE_TOPICS or force:
         conf = kafka_config.get_kafka_admin_cluster_options(cluster_name)
+        # Topics are implicitly created here
         admin_client = AdminClient(conf)
         wait_for_topics(admin_client, topics)