public static void ProduceMessage(string message, string key = "") { PayloadMessage payloadMessage = new PayloadMessage { Value = message, Key = key }; switch (KafkaDriver) { case JAVA: Console.WriteLine("In JavaPublisher"); LogResult.Report(Log, "log_ForInfo", "In JavaPublisher"); if (JavaPublisher != null) { JavaPublisher.Publish(payloadMessage); } else { Console.WriteLine("Javapublisher is null " + JavaPublisher); LogResult.Report(Log, "log_ForInfo", "Javapublisher is null" + JavaPublisher); } break; } }
public static void ProduceMessage(string message, string key = "") { PayloadMessage payloadMessage = new PayloadMessage { Value = message, Key = key }; if (KafkaDriver.Equals(RPL)) { RPLPublisher.Publish(payloadMessage); } else if (KafkaDriver.Equals(MISAKAI)) { MisakaiPublisher.Publish(payloadMessage); } else if (KafkaDriver.Equals(JAVA)) { JavaPublisher.Publish(payloadMessage); } }