queue.bind() issue #103

programmermattsrum opened this Issue Jun 8, 2012 · 1 comment


None yet

2 participants


I am having an issue while connecting to rabbitMQ. Sometimes bind('') works, but it stops working and then bind('#') works and back and forth. When it stops working every other request is working.

var amqp = require('amqp');

var connection = amqp.createConnection({ url: rabbitUrl() },
                        {defaultExchangeName: ''});

connection.on('ready', function () {
   io.sockets.on('connection', function (socket) {
      connection.queue('discdogevents_main_queue', {durable:false, exclusive:false, autoDelete:true},function(q){

      //q.bind('#'); // all messages

      q.subscribe(function (message) {
         socket.emit('messages', message.data.toString('ascii'));


IGNORE BELOW - this was caused by NPM pushing out an old version (mentioned in another issue). Once I manually updated, problem went away.

I have a slightly similar issue. I can't bind to q because q returns 0. Nothing else. If I setup my code as:

self.queue = self.connection.queue(self.opts.queuename, { durable:true, autoDelete: false }, function(q)
      // q = 0 so can't bind to it.
     self.queue.bind("*");  // works fine without a problem...???  why is the value in the callback = to 0?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment