Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the request_metadata_update method #14152

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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