예제 #1
0
        public void AddProducer(Broker broker)
        {
            var syncProducerConfig = new SyncProducerConfiguration(this.Config, broker.Id, broker.Host, broker.Port);
            var producerWrapper    = new SyncProducerWrapper(syncProducerConfig, this.Config.SyncProducerOfOneBroker);

            Logger.DebugFormat("Creating sync producer for broker id = {0} at {1}:{2} SyncProducerOfOneBroker:{3}", broker.Id, broker.Host, broker.Port, this.Config.SyncProducerOfOneBroker);
            this.syncProducers.TryAdd(broker.Id, producerWrapper);
        }
 public void AddProducer(Broker broker)
 {
     var syncProducerConfig = new SyncProducerConfiguration(this.Config, broker.Id, broker.Host, broker.Port);
     var producerWrapper = new SyncProducerWrapper(syncProducerConfig, this.Config.SyncProducerOfOneBroker);
     Logger.DebugFormat("Creating sync producer for broker id = {0} at {1}:{2} SyncProducerOfOneBroker:{3}", broker.Id, broker.Host, broker.Port, this.Config.SyncProducerOfOneBroker);
     this.syncProducers.TryAdd(broker.Id, producerWrapper);
 }