示例#1
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);
 }
示例#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);
 }