amqp-wrapper
Advanced tools
Comparing version 7.0.0-es6.2 to 7.0.0-es6.3
const amqp = require('amqplib'); | ||
const stringifysafe = require('json-stringify-safe'); | ||
const queueSetup = require('./lib/queue-setup'); | ||
const { promisify } = require('util'); | ||
@@ -77,7 +78,7 @@ /** | ||
*/ | ||
async publish (routingKey, message, options) { | ||
async publish (routingKey, message, options = {}) { | ||
if (typeof message === 'object') { | ||
message = stringifysafe(message); | ||
} | ||
return this.channel.publish(this.config.exchange, routingKey, Buffer.from(message), options); | ||
return promisify(this.channel.publish.bind(this.channel, this.config.exchange, routingKey, Buffer.from(message), options)); | ||
} | ||
@@ -84,0 +85,0 @@ |
{ | ||
"name": "amqp-wrapper", | ||
"version": "7.0.0-es6.2", | ||
"version": "7.0.0-es6.3", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">= 8" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23389
407