title: RabbitMQ C# API Event based Message Consumption
body: <pre><code>while (true)
  {
      BasicDeliverEventArgs e = (BasicDeliverEventArgs)Consumer.Queue.Dequeue();
      IBasicProperties properties = e.BasicProperties;
      byte[] body = e.Body;
      Console.WriteLine("Recieved Message : " + Encoding.UTF8.GetString(body));
      ch.BasicAck(e.DeliveryTag, false);
  }
  </code></pre>
  
  <p>This is what we do when we Retrieve Message by subscription..We use While Loop because we want Consumer to listen Continously..what if i want to make this even based..that is when a new message arrives in the queue at that time only Consumer should Consume the message..or on any such similar event..</p>