title: RabbitMQ / AMQP: single queue, multiple consumers for same message?
body: <p>I am just starting to use RabbitMQ and AMQP in general.</p>
  
  <ul>
  <li>I have a queue of messages</li>
  <li>I have multiple consumers, which I would like to do different things with the <strong>same message</strong>. </li>
  </ul>
  
  <p>Most of the RabbitMQ documentation seems to be focused on round-robin, ie where a single message is consumed by a single consumer, with the load being spread between each consumer. This is indeed the behavior I witness. </p>
  
  <p>An example: the producer has a single queue, and send messages every 2 sec:</p>
  
  <pre><code>var amqp = require('amqp');
  var connection = amqp.createConnection({ host: "localhost", port: 5672 });
  var count = 1;
  
  connection.on('ready', function () {
    var sendMessage = function(connection, queue_name, payload) {
      var encoded_payload = JSON.stringify(payload);  
      connection.publish(queue_name, encoded_payload);
    }
  
    setInterval( function() {    
      var test_message = 'TEST '+count
      sendMessage(connection, "my_queue_name", test_message)  
      count += 1;
    }, 2000) 
  
  
  })
  </code></pre>
  
  <p>And here's a consumer:</p>
  
  <pre><code>var amqp = require('amqp');
  var connection = amqp.createConnection({ host: "localhost", port: 5672 });
  connection.on('ready', function () {
    connection.queue("my_queue_name", function(queue){
      queue.bind('#'); 
      queue.subscribe(function (message) {
        var encoded_payload = unescape(message.data)
        var payload = JSON.parse(encoded_payload)
        console.log('Recieved a message:')
        console.log(payload)
      })
    })
  })
  </code></pre>
  
  <p>If I start the consumer twice, <strong>I can see that each consumer is consuming alternate messages in round-robin behavior. Eg, I'll see messages 1, 3, 5 in one terminal, 2, 4, 6 in the other</strong>.</p>
  
  <p>My question is: </p>
  
  <ul>
  <li><p>Can I have each consumer receive the same messages? Ie, both consumers get message 1, 2, 3, 4, 5, 6? What is this called in AMQP/RabbitMQ speak? How is it normally configured?</p></li>
  <li><p>Is this commonly done? Should I just have the exchange route the message into two separate queues, with a single consumer, instead? </p></li>
  </ul>