[rabbitmq-discuss] Queue automatically binding to default exchange...

Tom Wrigg tadw99 at googlemail.com
Sun Jun 17 02:33:04 BST 2012


Hello,

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...

Here's the code:

var amqp = require('amqp');

var connection = amqp.createConnection({host:'localhost'});

connection.on('ready', function(){
    var q = connection.queue('test_queue_name');
    var exc = connection.exchange('test_exchange', { autoDelete:true });
    q.bind('test_exchange', 'test.key');
});

Here's the console output when using the "rabbitmqctl list_bindings" 
command:

Listing bindings ...
        exchange        test_queue_name queue   test_queue_name []
test_exchange   exchange        test_queue_name queue   test.key        []
...done.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120616/0f3d3dc4/attachment.htm>


More information about the rabbitmq-discuss mailing list