コード例 #1
0
        public void Write(MetricValue metric)
        {
            var produceResponse = l_kafkaProducer.SendMessageAsync(l_kafkaProducerConfig.Settings.Topic, new[] { new Message(metric.GetJsonString()) });

            if (produceResponse.IsFaulted || produceResponse.IsCanceled)
            {
                l_logger.ErrorFormat("kafka producer write false: {0}", produceResponse.Exception);
            }
        }
コード例 #2
0
 public void Write(MetricValue metric)
 {
     l_logger.InfoFormat("console runner output {0}", metric.GetJsonString());
     Console.WriteLine("console runner output {0}", metric.GetJsonString());
 }