postwait/node-amqp — Issue #40: Promise returned from Exchange.publish() never has events emitted
Author: ahildoer
Created: 2011-10-19 16:02:05+00:00
State: open

When I publish a message using Exchange.publish(), it returns a promise. That promise never has success emitted, even if the message is delivered successfully to the server. In fact, it is never called even when my consumer process on the other end logs that the message was delivered.

To recreate:

// assuming you have a connection and exchange is a valid exchange object
var promise = exchange.publish('everyone', 'hello world');

promise.on('success', function(){
console.log('you will never see this');
});

promise.addCallback(function(){
console.log('...or this');
});