KafkaNet.MetadataQueries.GetTopicFromCache C# (CSharp) Method

GetTopicFromCache() public method

Get metadata on the given topic.
public GetTopicFromCache ( string topic ) : KafkaNet.Protocol.Topic
topic string The metadata on the requested topic.
return KafkaNet.Protocol.Topic
        public Topic GetTopicFromCache(string topic)
        {
            var response = _brokerRouter.GetTopicMetadataFromLocalCache(topic);

            if (response.Count <= 0) throw new InvalidTopicMetadataException(ErrorResponseCode.NoError, "No metadata could be found for topic: {0}", topic);

            return response.First();
        }