<br>Hello,<br><br>I'm using rabbitmq with node.js and have a problem when binding queues. Every time I bind a queue to a named exchange it automatically seems to bind to the 'default' direct exchange as well. Why is it doing this and how can I make it stop? Any help would be great thanks...<br><br>Here's the code:<br><br>var amqp = require('amqp');<br><br>var connection = amqp.createConnection({host:'localhost'});<br><br>connection.on('ready', function(){<br> var q = connection.queue('test_queue_name');<br> var exc = connection.exchange('test_exchange', { autoDelete:true });<br> q.bind('test_exchange', 'test.key');<br>});<br><br><p>Here's the console output when using the "rabbitmqctl list_bindings" command:</p>
<pre class="default prettyprint"><code><span class="typ">Listing</span><span class="pln"> bindings </span><span class="pun">...</span><span class="pln"><br> exchange test_queue_name queue test_queue_name </span><span class="pun">[]</span><span class="pln"><br>test_exchange exchange test_queue_name queue test</span><span class="pun">.</span><span class="pln">key </span><span class="pun">[]</span><span class="pln"><br></span><span class="pun">...</span><span class="kwd">done</span><span class="pun">.</span><span class="pln"><br></span></code></pre>
<br><br><br>