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

[BUGFIX] Forward amqp options when publish to exchange #183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion lib/abstract_ascoltatore.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ AbstractAscoltatore.prototype._setPublish = function() {
publish = this.publish;
} else {
publish = function (topic, payload, options, done) {
return f.call(this, topic, payload, done);
return f.call(this, topic, payload, options, done);
};
}

Expand Down
4 changes: 2 additions & 2 deletions lib/amqp_ascoltatore.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ AMQPAscoltatore.prototype.subscribe = function subscribe(topic, callback, done)
debug("registered new subscriber for topic " + topic);
};

AMQPAscoltatore.prototype.publish = function publish(topic, message, done) {
AMQPAscoltatore.prototype.publish = function publish(topic, message, options, done) {
this._raiseIfClosed();

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

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

Expand Down