Exemplo n.º 1
0
 public MQTTDaegunSubscribe(ILoggerFactory loggerFactory, IBackgroundMongoTaskQueue taskQueue, MqttSubscribeConfig mqtt_config)
 {
     mqttOptions = mqtt_config;
     queue       = taskQueue;
     _logger     = loggerFactory.CreateLogger <MQTTDaegunSubscribe>();
     StartSubscribe();
 }
Exemplo n.º 2
0
 public BackgroundMqttService(ILoggerFactory loggerFactory, MqttSubscribeConfig config)
 {
     factory = new MqttFactory();
     client  = factory.CreateMqttClient();
     var client_options = new MqttClientOptions
     {
         ChannelOptions = new MqttClientTcpOptions
         {
             Server = config.BindAddress,
             Port   = config.Port,
         }
     };
 }
        public MongoBackgroundHostService(IBackgroundMongoTaskQueue taskQueue,
                                          IRedisConnectionFactory redis_factory,
                                          MongoClient mongoclient, MqttSubscribeConfig mqttConfig,
                                          ILoggerFactory loggerFactory)
        {
            TaskQueue = taskQueue;
            _client   = mongoclient;

            _redisFactory = redis_factory;
            _mqttConfig   = mqttConfig;
            _redisDb      = _redisFactory.Connection().GetDatabase();


            _logger = loggerFactory.CreateLogger <MongoBackgroundHostService>();
        }
 public MongoBackgroundHostService(
     IBackgroundMongoTaskQueue taskQueue,
     IConfiguration configuration,
     MqttSubscribeConfig mqttConfig,
     ILoggerFactory loggerFactory,
     MysqlDataAccess da
     )
 {
     TaskQueue       = taskQueue;
     _mqttConfig     = mqttConfig;
     insertBatchList = new ConcurrentBag <DaegunPacketClass>();
     _da             = da;
     BatchInterval   = configuration.GetSection("BatchInterval").Get <TimeSpan>();
     _logger         = loggerFactory.CreateLogger <MongoBackgroundHostService>();
 }
 public MQTTBackgroundSubscribeService(ILoggerFactory loggerFactory, IBackgroundMongoTaskQueue taskQueue, MqttSubscribeConfig mqtt_config)
 {
     mqttOptions = mqtt_config;
     queue       = taskQueue;
     logger      = loggerFactory.CreateLogger <MQTTBackgroundSubscribeService>();
 }
Exemplo n.º 6
0
 public MQTTDaegunSubscribe(ILoggerFactory logger, MqttSubscribeConfig mqtt_config)
 {
     _logger     = logger.CreateLogger <MQTTDaegunSubscribe>();
     mqttOptions = mqtt_config;
     StartSubscribe();
 }