Chris,

There is a .topic() method available on that object:
https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/requests/MetadataResponse.java#L323

–
Best regards,
Radek Gruchalski
ra...@gruchalski.com
de.linkedin.com/in/radgruchalski


*Confidentiality:*This communication is intended for the above-named person
and may be confidential and/or legally privileged.
If it has come to you in error you must take no action based on it, nor
must you copy or show it to anyone; please delete/destroy and inform the
sender immediately.

On July 26, 2016 at 8:08:18 PM, Chris Barlock (barl...@us.ibm.com) wrote:

Starting with Kafka 0.8.2.1, we have some code that call
AdminUtils.fetchTopicMetadataFromZk. This returned a
kafka.api.TopicMetadata object which provided some useful information
about the topic. With 0.10.0.0, fetchTopicMetadataFromZk returns
org.apache.kafka.common.requests.MetadataResponse.TopicMetadata. This
TopicMetadata does not have a toString method, so we get the rather
useless version from Object.

Does Kafka 0.10 provide some other way to get topic metadata?

Chris

Reply via email to