Ejemplo n.º 1
0
        protected override void Consumer_Received(object sender, BasicDeliverEventArgs e)
        {
            var body    = e.Body;
            var message = BinarySerializer.ByteArrayToObject(body).ToString();

            Console.WriteLine(" [x] Received {0}", message);

            int dots = message.Split('.').Length - 1;

            Thread.Sleep(dots * 1000); // it's just here to check if RabbitMQ works correctly for multiple consumers

            Console.WriteLine(" [x] Done");

            base.Consumer_Received(sender, e);
        }