public async Task DeleteTopicAsync(string topicName)
        {
            var topics = _innerClient.GetMetadata(TimeSpan.FromSeconds(30)).Topics;

            if (topics.Select(t => t.Topic).Contains(topicName))
            {
                await _innerClient.DeleteTopicsAsync(new[] { topicName });
            }

            await Task.Delay(5000);
        }
示例#2
0
        public async Task <IActionResult> DeleteTopicAsync([FromBody] List <string> topics)
        {
            await _client.DeleteTopicsAsync(topics);

            return(Ok());
        }
示例#3
0
 public async Task CleanAsync(IList <string> topics)
 {
     await _adminClient.DeleteTopicsAsync(topics, null);
 }