public SyncProducer(SyncProducerConfig config) { Logger.Debug("Instantiating Scala Sync Producer"); this.Config = config; this.blockingChannel = new BlockingChannel(config.Host, config.Port, BlockingChannel.UseDefaultBufferSize, config.SendBufferBytes, config.RequestTimeoutMs); this.BrokerInfo = string.Format("host_{0}-port_{1}", config.Host, config.Port); this.producerRequestStats = ProducerRequestStatsRegistry.GetProducerRequestStats(config.ClientId); }
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); }