Last active
December 19, 2015 15:29
-
-
Save datariot/5976772 to your computer and use it in GitHub Desktop.
Having a problem where running on the server in Meteor, only the first callback parameter is received. Running at Node console correctly returns all the parameters for the callback. I've left out some code that ensures the RabbitMQ server is ready for brevity.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AMQP = Npm.require("amqp"); | |
rabbitMQ = AMQP.createConnection({ host: '127.0.0.1' }); | |
rabbitMQ.queue('foo', {durable:true, autoDelete:false}, function (queue, messages, consumers) { | |
console.log('Queue ' + queue.name + ' is open with ' + messages + ' messages'); | |
}); | |
/* Queue foo is open with undefined messages */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AMQP = require("amqp"); | |
rabbitMQ = AMQP.createConnection({ host: '127.0.0.1' }); | |
rabbitMQ.queue('foo', {durable:true, autoDelete:false}, function (queue, messages, consumers) { | |
console.log('Queue ' + queue.name + ' is open with ' + messages + ' messages'); | |
}); | |
/* Queue foo is open with 3 messages */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment