Exemplo n.º 1
0
 public void Subscribe(string consumerGroupId, IEnumerable <string> topics, ConsumerGroupConfiguration configuration)
 {
     if (_disposed)
     {
         return;
     }
     _clusterClient.Subscribe(consumerGroupId, topics, configuration);
 }
 /// <summary>
 /// Subscribe to a list of topics, using a given consumer group id.
 /// Only one subscription is supported at a time. If you want to consumfrom multiple
 /// consumer group, you have to instanciate multiple ClusterClient.
 /// </summary>
 /// <param name="consumerGroupId"></param>
 /// <param name="topics"></param>
 /// <param name="configuration"></param>
 public void Subscribe(string consumerGroupId, IEnumerable <string> topics,
                       ConsumerGroupConfiguration configuration)
 {
     _cluster.ConsumeRouter.StartConsumeSubscription(new ConsumerGroup(consumerGroupId, configuration, _cluster), topics);
 }