servicebus
Advanced tools
Comparing version 2.3.2 to 2.3.3
@@ -88,2 +88,3 @@ var amqp = require('amqplib'), | ||
done(); | ||
return channel; | ||
}); | ||
@@ -100,2 +101,3 @@ | ||
done(); | ||
return channel; | ||
}); | ||
@@ -113,2 +115,3 @@ | ||
done(); | ||
return channel; | ||
}); | ||
@@ -180,2 +183,3 @@ } | ||
em.emit('success'); | ||
return ok; | ||
}); | ||
@@ -182,0 +186,0 @@ return em; |
@@ -65,3 +65,3 @@ var events = require('events'); | ||
channel.publish(self.exchangeName, self.routingKey || self.queueName, new Buffer(options.formatter.serialize(event)), options, cb); | ||
channel.publish(self.exchangeName, self.routingKey || self.queueName, Buffer.from(options.formatter.serialize(event)), options, cb); | ||
@@ -94,2 +94,3 @@ }; | ||
} | ||
return this; | ||
}); | ||
@@ -138,2 +139,3 @@ } else { | ||
receipt.emit('subscribed'); | ||
return ok; | ||
}); | ||
@@ -144,3 +146,3 @@ } | ||
if (err) throw err; | ||
self.listenChannel.assertQueue(uniqueName, self.queueOptions) | ||
return self.listenChannel.assertQueue(uniqueName, self.queueOptions) | ||
.then(function (qok) { | ||
@@ -154,8 +156,8 @@ return self.listenChannel.bindQueue(uniqueName, self.exchangeName, self.routingKey || self.queueName); | ||
}); | ||
self.listenChannel.assertQueue(self.errorQueueName, errorQueueOptions) | ||
return self.listenChannel.assertQueue(self.errorQueueName, errorQueueOptions) | ||
.then(function (_qok) { | ||
_subscribe(uniqueName); | ||
return _subscribe(uniqueName); | ||
}); | ||
} else { | ||
_subscribe(uniqueName); | ||
return _subscribe(uniqueName); | ||
} | ||
@@ -162,0 +164,0 @@ }); |
@@ -52,6 +52,7 @@ var EventEmitter = require('events').EventEmitter; | ||
}); | ||
self.listenChannel.assertQueue(self.errorQueueName, self.queueOptions) | ||
return self.listenChannel.assertQueue(self.errorQueueName, self.queueOptions) | ||
.then(function (_qok) { | ||
self.initialized = true; | ||
self.emit('ready'); | ||
return _qok; | ||
}); | ||
@@ -61,2 +62,3 @@ } else { | ||
self.emit('ready'); | ||
return this; | ||
} | ||
@@ -117,2 +119,3 @@ }).catch(function (err) { | ||
self.emit('listening'); | ||
return ok; | ||
}); | ||
@@ -129,2 +132,3 @@ | ||
em.emit('success'); | ||
return ok; | ||
}); | ||
@@ -144,6 +148,7 @@ if (this.errorQueueName && this.ack) { | ||
.then(function (err, ok) { | ||
delete self.subscription; | ||
self.listening = false; | ||
self.bus.emit('unlistened', self); | ||
em.emit('success'); | ||
delete self.subscription; | ||
self.listening = false; | ||
self.bus.emit('unlistened', self); | ||
em.emit('success'); | ||
return ok; | ||
}); | ||
@@ -170,3 +175,3 @@ } else { | ||
channel.sendToQueue(this.routingKey || this.queueName, new Buffer(options.formatter.serialize(event)), options, cb); | ||
channel.sendToQueue(this.routingKey || this.queueName, Buffer.from(options.formatter.serialize(event)), options, cb); | ||
@@ -173,0 +178,0 @@ }; |
{ | ||
"name": "servicebus", | ||
"description": "Simple service bus for sending events between processes using amqp.", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"author": "Matt Walters <mattwalters5@gmail.com>", | ||
@@ -36,3 +36,3 @@ "contributors": [ | ||
"cz-conventional-changelog": "2.1.0", | ||
"jest": "23.6.0", | ||
"jest": "24.0.0", | ||
"longjohn": "0.2.12", | ||
@@ -39,0 +39,0 @@ "mocha": "5.2.0", |
@@ -1,2 +0,2 @@ | ||
[![Build Status](https://travis-ci.org/mateodelnorte/servicebus.svg?branch=master)](https://travis-ci.org/mateodelnorte/servicebus) [![Greenkeeper badge](https://badges.greenkeeper.io/mateodelnorte/servicebus.svg)](https://greenkeeper.io/) | ||
[![Build Status](https://travis-ci.org/mateodelnorte/servicebus.svg?branch=master)](https://travis-ci.org/mateodelnorte/servicebus) | ||
@@ -3,0 +3,0 @@ # servicebus |
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
67761
1597