public MessageProducerChildActor()
 {
     Receive<Message>(msg =>
     {
         Console.WriteLine("before Producer ");
         producerService = new KakfaProducerService<MessageDTO>("keltonjohntest", new Uri[] { new Uri("http://logsvrdev:9092"), });
         producerService.Send(new MessageDTO(msg.Data));
         Console.WriteLine("Producer Send Child Actr path " + Self.Path + " message from frontend sent to kafka" + msg.Data);
         Console.WriteLine(msg.Data);
     });
 }
예제 #2
0
        private static void Produce2()
        {
            //string message = string.Format("{0} - {1}", DateTime.UtcNow.ToString("O"), Guid.NewGuid());

            var svc = new KakfaProducerService<Test>("john", new [] { new Uri("http://logsvrdev:9092") });
            svc.Send(new Test("asaaaadf","aaaa"));
            //Console.WriteLine("In after send message " + message);
        }