Exemplo n.º 1
0
        /// <summary>
        /// 获取程序池Topic
        /// </summary>
        /// <param name="dbType">程序池Topic类型</param>
        /// <returns>根据dbType过滤后的程序池Topic</returns>
        private IEnumerable <string> GetUrlPoolTopics(int interval, string dbType)
        {
            Regex regex    = new Regex($@"UrlPool_{dbType}_\w+_");
            var   metadata = KafkaTool.GetMetaData(KafkaBroker);

            return(metadata.Topics.Where(w =>
            {
                return TopicFilter(w.Topic, dbType, interval);
            })
                   .Select(s =>
            {
                return s.Topic;
            })
                   .ToList()
                   );
        }
Exemplo n.º 2
0
 public void TestMethod1()
 {
     var topics = KafkaTool.GetMetaData(KafkaBroker);
 }