title: How can I check whether a RabbitMQ message queue exists or not?
body: <p>How can I check whether a message Queue already exists or not?</p>
  
  <p>I have 2 different applications, one creating a queue and the other reading from that queue.</p>
  
  <p>So if I run the Client which reads from the queue first, than it crashes.<br/>
  So to avoid that i would like to check first whether the queue exists or not.</p>
  
  <p>here is the code snippet of how I read the queue:</p>
  
  <pre><code>QueueingBasicConsumer &lt;ConsumerName&gt; = new QueueingBasicConsumer(&lt;ChannelName&gt;); 
  &lt;ChannelName&gt;.BasicConsume("&lt;queuename&gt;", null, &lt;ConsumerName&gt;); 
  BasicDeliverEventArgs e = (BasicDeliverEventArgs)&lt;ConsumerName&gt;.Queue.Dequeue();
  </code></pre>