Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Feature/bn forward callback function #185

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[BUGFIX] Forward callback function when publish to exchange
When publishing a message to rabbitmq via amqp the callback function was
defered independent of the result of exchange publish process.
Now the callback is called by this, enhancing reliability of "done"
state.
  • Loading branch information
Bernd Niehues authored and Bernd Niehues committed Feb 22, 2018
commit 4830f2c3d1d65ab892fd1c9ebaa96da408280ea0
3 changes: 1 addition & 2 deletions lib/amqp_ascoltatore.js
Original file line number Diff line number Diff line change
@@ -158,8 +158,7 @@ AMQPAscoltatore.prototype.publish = function publish(topic, message, options, do

debug("new message published to " + topic);

this._exchange.publish(this._pubTopic(topic), String(message), options);
defer(done);
this._exchange.publish(this._pubTopic(topic), String(message), options, done);
};

AMQPAscoltatore.prototype.unsubscribe = function unsubscribe(topic, callback, done) {