Closed sarudak closed 8 years ago
Running kafka_2.11-0.10.0.0 on my local machine (mac). Connection is coming from a windows VM.
My Code:
class Program { private string _hostIp = "192.168.56.1"; private async void WriteToQueue(string message) { using (Producer producer = new Producer(_hostIp + ":9092")) using (Topic topic = producer.Topic("test")) { byte[] data = Encoding.UTF8.GetBytes(message); DeliveryReport deliveryReport = await topic.Produce(data); Console.WriteLine($"Produced to Partition: {deliveryReport.Partition}, Offset: {deliveryReport.Offset}"); } } static void Main(string[] args) { var program = new Program(); program.WriteToQueue("Hello"); Thread.Sleep(2000); } }
My mistake. My environment was not clean and a full restart resolved the issue. Apologies.
Running kafka_2.11-0.10.0.0 on my local machine (mac). Connection is coming from a windows VM.
My Code: