Exemple #1
0
        public static ConsumerConfigurationSection FromXml(XElement element)
        {
            var section = new ConsumerConfigurationSection();

            section.DeserializeSection(element.CreateReader());
            return(section);
        }
 private static void Validate(ConsumerConfigurationSection config)
 {
     ValidateClientId(config.ClientId);
     ValidateGroupId(config.GroupId);
     ValidateAutoOffsetReset(config.AutoOffsetReset);
 }
 public ConsumerConfig(ConsumerConfigurationSection config)
 {
     Validate(config);
     this.GroupId = config.GroupId;
     this.ConsumerId = config.ConsumerId;
     this.SocketTimeoutMs = config.SocketTimeout;
     this.SocketReceiveBufferBytes = config.SocketBufferSize;
     this.FetchMessageMaxBytes = config.FetchSize;
     this.NumConsumerFetchers = config.NumConsumerFetchers;
     this.AutoCommitEnable = config.AutoCommit;
     this.AutoCommitIntervalMs = config.AutoCommitInterval;
     this.QueuedMaxMessages = config.MaxQueuedChunks;
     this.RebalanceMaxRetries = config.MaxRebalanceRetries;
     this.FetchMinBytes = config.MinFetchBytes;
     this.FetchWaitMaxMs = config.MaxFetchWaitMs;
     this.RebalanceBackoffMs = config.RebalanceBackoffMs;
     this.RefreshLeaderBackoffMs = config.RefreshMetadataBackoffMs;
     this.AutoOffsetReset = config.AutoOffsetReset;
     this.ConsumerTimeoutMs = config.ConsumerTimeoutMs;
     this.ClientId = config.GroupId;
   
     this.SetZooKeeperConfiguration(config.ZooKeeperServers);
 }
 public static ConsumerConfigurationSection FromXml(XElement element)
 {
     var section = new ConsumerConfigurationSection();
     section.DeserializeSection(element.CreateReader());
     return section;
 }