public void Enqueue(Point[] points)
        {
            foreach (var config in _configBusiness.OpenDatabaseConfig())
            {
                IFormatter formatter;
                try
                {
                    var agent = _influxDbAgentLoader.GetAgent(config);
                    var agentInfo = agent.GetAgentInfo();
                    formatter = agentInfo.Item1;
                    _outputMessage("Send to " + config.Url + " ver " + agentInfo.Item2, OutputLevel.Information);
                }
                catch (InvalidOperationException)
                {
                    var ifx = new InfluxDb("http://influx-capacitor.com", "-", "-", InfluxVersion.v09x);
                    formatter = ifx.GetFormatter();
                    _outputMessage("Unknown client version, simulation output for version " + ifx.GetClientVersion() + ".", OutputLevel.Warning);
                }

                foreach (var point in points)
                {
                    _outputMessage(formatter.PointToString(point), OutputLevel.Information);
                }
            }
        }
Example #2
0
        public KafkaAgent(Uri[] kafkaServers)
        {
            var options = new KafkaOptions(kafkaServers);
            _router = new BrokerRouter(options);

            var influxDbClient = new InfluxDb("http://localhost", "reapadda", "qwerty", InfluxVersion.v09x);
            _formatter = influxDbClient.GetFormatter();
        }