<div>What I require from usage of RabbitMQ is: </div>
<div>The producer produces messages and receiver receives <i>all</i> the messages, which are published after the time it has first connected to the queue.</div>
<p>Since a consumer wants to consume all the messages published. Since, if more than one consumer is connected to same queue, then consumers will not receive all the messages.(Also, see <a href="http://stackoverflow.com/questions/1831705/multiple-consumer-one-queue"><font color="#4a6b82">here</font></a>). Hence, the consumer must create an <b>'exclusive'</b> queue and get connected to the desired exchange. Also, it wants to receive all the messages which were published even when it is down ( in the future). Hence the queue is <b>'durable'</b>. Now, the scenario looks like :</p>
<p>A consumer C1 creates a queue Q1 which is exclusive and durable. Now it is down for some time and in the meantime another user C2 tries to connect to queue Q1. C2 will be successfull since, Q1 has now no subscriber connected to it. So, C2 gets connected to the exclusive and durable queue. Now, if C1 tries to connect to queue Q1 it cannot do so, since already a consumer C2 is subscribed to the queue Q1.</p>
<p>How one can prevent such scenario ? </p>