示例#1
0
        static void Main(string[] args)
        {
            //Kafka Consume Messages
            List <string> topics = new List <string>();

            topics.Add("Test-Topics");

            _consumerClient.Consume(topics, HandlerMessage);

            var msg = Encoding.UTF8.GetBytes("testMsg");

            //Kafka Producer
            _connectionPool.Rent().ProduceAsync("Test-Topic", null, msg);
        }
示例#2
0
        static void Main(string[] args)
        {
            Setup();
            Console.WriteLine();
            List <string> topics = new List <string>();

            topics.Add("test");
            _consumerClient.Consume(topics, HandlerMessage);



            _bus.Send("ServiceBus.TestPublish.NetCore", new RequestIntegrationEvent()
            {
                Message = "Masstransit test Succees!"
            });
            _logger.Info("ServiceBus Logs test!!");
            Console.WriteLine("Masstransit test Succees!");
            Console.ReadKey();
        }