Skip to content

Commit 08420ab

Browse files
committed
PUB/SUB exchange don't have to be durable
If you assume connect/subscribe will be called again on a new socket.
1 parent ce6338b commit 08420ab

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/sockets.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ PubSocket.prototype.connect = function(destination, callback) {
161161
var self = this, ch = this.ch;
162162
ch.assertExchange(destination,
163163
this.options.routing || 'fanout',
164-
{durable: this.options.persistent,
164+
{durable: false,
165165
autoDelete: true})
166166
.then(function(ok) {
167167
self.pubs.push(destination);
@@ -220,8 +220,7 @@ SubSocket.prototype.connect = function(source, callback) {
220220
var ch = this.ch, queue = this.queue, self = this;
221221
ch.assertExchange(source,
222222
this.options.routing || 'fanout',
223-
{durable: this.options.persistent,
224-
autoDelete: true})
223+
{autoDelete: true})
225224
.then(function(ok) {
226225
self.subs.push(source);
227226
self.patterns.forEach(function(pat) {

0 commit comments

Comments
 (0)