public Task CreateTopicsAsync(IEnumerable <TopicSpecification> topics, CreateTopicsOptions options = null)
 {
     return(Task.Run(() =>
     {
         foreach (var specs in topics)
         {
             if (specs.NumPartitions > 0)
             {
                 cluster.CreateTopic(specs.Name, specs.NumPartitions);
             }
             else
             {
                 cluster.CreateTopic(specs.Name);
             }
         }
     }));
 }
Example #2
0
 public void CreateTopic(string topic)
 => cluster.CreateTopic(topic);