Skip to content
This repository was archived by the owner on Nov 14, 2022. It is now read-only.

Commit 6a4e46f

Browse files
committed
Remove admin client
1 parent f7fbad4 commit 6a4e46f

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

autoreduce_qp/queue_processor/confluent_consumer.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,6 @@ def __init__(self, consumer=None):
2727
self.logger = logging.getLogger(__package__)
2828
self.logger.debug("Initializing the consumer")
2929

30-
kafka_broker = {'bootstrap.servers': KAFKA_BROKER_URL}
31-
admin_client = AdminClient(kafka_broker)
32-
topics = admin_client.list_topics().topics
33-
34-
if not topics:
35-
# Create the topic
36-
self.logger.info("Creating the topic '%s'", TRANSACTIONS_TOPIC)
37-
new_topic = NewTopic(TRANSACTIONS_TOPIC, num_partitions=1, replication_factor=1)
38-
admin_client.create_topics([new_topic])
39-
4030
self.consumer = consumer
4131
self.message_handler = HandleMessage()
4232
self._stop_event = threading.Event()

0 commit comments

Comments
 (0)