title: rabbitmq consumer getting messages of different routing key
body: <p>We have two consumers with c1 (in php) binding to exchange 1, queue 1 and routing key 1; and c2 (in java) binging to exchange 1, queue 1 and routing key 2. i.e. only routing keys are different, but exchange and queue are same.</p>
  
  <p>in php, we do binding as the following does</p>
  
  <pre><code>$channel-&gt;queue_bind($this-&gt;queue, $this-&gt;exchange, $this-&gt;routing1);
  </code></pre>
  
  <p>in java, the following</p>
  
  <pre><code>channel.queueBind(queue, exchange, routing2);
  </code></pre>
  
  <p>Now when we publish messages meant for c2 using routing key 2, we observed that the messages got received by c1 and c2 in round robin fashion instead of only got received by c2. </p>
  
  <p>The senders for c1 and c2 are all in php, with sender for c1 does the following</p>
  
  <pre><code>$channel-&gt;basic_publish($message, $this-&gt;exchange, $this-&gt;routing1);
  </code></pre>
  
  <p>And sender for c2 does the following</p>
  
  <pre><code>$channel-&gt;basic_publish($message, $this-&gt;exchange, $this-&gt;routing2);
  </code></pre>
  
  <p>Do we have correct assumption? Is there anything wrong with the code? </p>
  
  <p>[Edit1] as experiment, we changed to bind to separate queues for the two consumers and the publishers. and we observed that the messages meant for c2 (q2 and r2) got received by both c2 and c1... something is wrong here.</p>