Kafka.Client.Consumers.ZookeeperConsumerConnector.ZookeeperConsumerConnector C# (CSharp) Method

ZookeeperConsumerConnector() public method

Initializes a new instance of the ZookeeperConsumerConnector class.
public ZookeeperConsumerConnector ( Kafka.Client.Cfg.ConsumerConfiguration config, bool enableFetcher ) : System
config Kafka.Client.Cfg.ConsumerConfiguration /// The consumer configuration. At the minimum, need to specify the group ID /// of the consumer and the ZooKeeper connection string. ///
enableFetcher bool /// Indicates whether fetchers should be enabled ///
return System
        public ZookeeperConsumerConnector(ConsumerConfiguration config, bool enableFetcher)
        {
            this.config = config;
            this.enableFetcher = enableFetcher;
            this.ConnectZk();
            this.CreateFetcher();

            if (this.config.AutoCommit)
            {
                Logger.InfoFormat(CultureInfo.CurrentCulture, "starting auto committer every {0} ms", this.config.AutoCommitInterval);
                scheduler.ScheduleWithRate(this.AutoCommit, this.config.AutoCommitInterval, this.config.AutoCommitInterval);
            }
        }