Esempio n. 1
0
        private void ReceiveHandler(object sender, RabbitMQ.Client.Events.BasicDeliverEventArgs args)
        {
            string rs = Encoding.UTF8.GetString(args.Body.ToArray());

            Console.WriteLine(rs);
            rcvMq.Ack(args.DeliveryTag);
        }
        public void ReceiveHandler(object obj, BasicDeliverEventArgs args)
        {
            string rs = Encoding.UTF8.GetString(args.Body.ToArray());

            Dispatcher.Invoke(() =>
            {
                tbRcv.Text += $"{rs}\n";
            });
            mqClient.Ack(args.DeliveryTag);
        }