KafkaNet.MetadataQueries.GetTopicFromCache C# (CSharp) 메소드

GetTopicFromCache() 공개 메소드

Get metadata on the given topic.
public GetTopicFromCache ( string topic ) : KafkaNet.Protocol.Topic
topic string The metadata on the requested topic.
리턴 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();
        }