Skip to content

Commit

Permalink
Implement the request_metadata_update method
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentClarret committed Mar 14, 2023
1 parent 13a8fd3 commit 3d4577f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def get_partitions_for_topic(self, topic):
return None

def request_metadata_update(self):
raise NotImplementedError
# https://github.com/confluentinc/confluent-kafka-python/issues/594
self.kafka_client.list_topics(None, timeout=self.config._request_timeout_ms / 1000)

def get_consumer_offsets(self):
# {(consumer_group, topic, partition): offset}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ def get_partitions_for_topic(self, topic):
return self.confluent_kafka_client.get_partitions_for_topic(topic)

def request_metadata_update(self):
# TODO when this method is implemented in ConfluentKafkaClient, replace this with:
# if self.use_legacy_client:
# return self.python_kafka_client.request_metadata_update()
# return self.confluent_kafka_client.request_metadata_update()
return self.python_kafka_client.request_metadata_update()
if self.use_legacy_client:
return self.python_kafka_client.request_metadata_update()
return self.confluent_kafka_client.request_metadata_update()

def get_consumer_offsets_dict(self):
if self.use_legacy_client:
Expand Down

0 comments on commit 3d4577f

Please sign in to comment.