node-amqp exchange callback not being invoked
Question
I have the following code . My node version is v0.7.0-pre . When I run the code the screen prints
Setup
Completed setup
It does not print the Exchange Callback message . When I run the
rabbitmqctl --list_exchanges
command I see the new exchange getting created but the callback is not getting called . I looked at the test cases and this does not seem to be a covered case . Let me know if this is a bug and if there is a work around
var util= require('util')
var amqp = require('amqp');
function setup() {
console.log("Setup");
var exchange = conn.exchange('cf1-demo',
{'type': 'fanout', durable: false},
function() {
console.log("Exchange Callback");
});
console.log("Completed setup %s", exchange.name);
}
var conn = amqp.createConnection({host:'localhost',
login:'guest',
password:'guest'},
{defaultExchangeName: "cf1-demo"});
conn.on('ready',setup);
Solution
This was a problem with node-amqp being the old version . This seemed to be a problem with npm install as far as I can figure
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow