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