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); } }
public void Write(MetricValue metric) { l_logger.InfoFormat("console runner output {0}", metric.GetJsonString()); Console.WriteLine("console runner output {0}", metric.GetJsonString()); }