findTopicPartitionMetadata(topic) {
    const { metadata } = this.brokerPool
    if (!metadata || !metadata.topicMetadata) {
      throw new KafkaJSTopicMetadataNotLoaded('Topic metadata not loaded', { topic })
    }

    const topicMetadata = metadata.topicMetadata.find(t => t.topic === topic)
    return topicMetadata ? topicMetadata.partitionMetadata : []
  }
@public
@param {string} topic
@returns {import("../../types").PartitionMetadata[]} Example:
                  [{
                    isr: [2],
                    leader: 2,
                    partitionErrorCode: 0,
                    partitionId: 0,
                    replicas: [2],
                  }]