コード例 #1
0
ファイル: SimpleConsumer.cs プロジェクト: Cnova/kafka-net
 public SimpleConsumer(string host, int port, int soTimeout, int bufferSize, string clientId)
 {
     this.Host = host;
     this.Port = port;
     this.SoTimeout = soTimeout;
     this.BufferSize = bufferSize;
     this.ClientId = clientId;
     ConsumerConfig.ValidateClientId(clientId);
     this.blockingChannel = new BlockingChannel(this.Host, this.Port, this.BufferSize, BlockingChannel.UseDefaultBufferSize, this.SoTimeout);
     this.fetchRequestAndResponseStats =
         FetchRequestAndResponseStatsRegistry.GetFetchRequestAndResponseStats(clientId);
 }
コード例 #2
0
 public SimpleConsumer(string host, int port, int soTimeout, int bufferSize, string clientId)
 {
     this.Host       = host;
     this.Port       = port;
     this.SoTimeout  = soTimeout;
     this.BufferSize = bufferSize;
     this.ClientId   = clientId;
     ConsumerConfig.ValidateClientId(clientId);
     this.blockingChannel = new BlockingChannel(this.Host, this.Port, this.BufferSize, BlockingChannel.UseDefaultBufferSize, this.SoTimeout);
     this.fetchRequestAndResponseStats =
         FetchRequestAndResponseStatsRegistry.GetFetchRequestAndResponseStats(clientId);
 }