Esempio n. 1
0
 public EQueueClient(string clusterName, List <IPEndPoint> nameServerList)
 {
     ClusterName          = clusterName;
     NameServerList       = nameServerList;
     _subscriptionClients = new List <EQueueConsumer>();
     _queueConsumers      = new List <EQueueConsumer>();
     _logger   = IoCFactory.Resolve <ILoggerFactory>().Create(GetType().Name);
     _producer = new EQueueProducer(ClusterName, NameServerList);
     _producer.Start();
 }
Esempio n. 2
0
 public EQueueClient(string brokerAddress, int producerPort = 5000, int consumerPort = 5001, int adminPort = 5002)
 {
     BrokerAddress            = brokerAddress;
     ProducerPort             = producerPort;
     ConsumerPort             = consumerPort;
     AdminPort                = adminPort;
     _subscriptionClients     = new List <EQueueConsumer>();
     _queueConsumers          = new List <EQueueConsumer>();
     _subscriptionClientTasks = new List <Task>();
     _commandClientTasks      = new List <Task>();
     _logger   = IoCFactory.Resolve <ILoggerFactory>().Create(this.GetType().Name);
     _producer = new EQueueProducer(BrokerAddress, ProducerPort, AdminPort);
     _producer.Start();
 }