amqp-connection-manager
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -25,3 +25,3 @@ // Generated by CoffeeScript 1.10.0 | ||
function AmqpConnectionManager(urls, options) { | ||
var ref; | ||
var ref, ref1; | ||
this.urls = urls; | ||
@@ -37,2 +37,3 @@ if (options == null) { | ||
this.heartbeatIntervalInSeconds = (ref = options.heartbeatIntervalInSeconds) != null ? ref : HEARTBEAT_IN_SECONDS; | ||
this.reconnectTimeInSeconds = (ref1 = options.reconnectTimeInSeconds) != null ? ref1 : this.heartbeatIntervalInSeconds; | ||
this.setMaxListeners(0); | ||
@@ -110,3 +111,3 @@ this._connect(); | ||
_this._currentConnection = null; | ||
return wait(_this.heartbeatIntervalInSeconds * 1000).then(function() { | ||
return wait(_this.reconnectTimeInSeconds * 1000).then(function() { | ||
return _this._connect(); | ||
@@ -113,0 +114,0 @@ }); |
{ | ||
"name": "amqp-connection-manager", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Auto-reconnect and round robin support for amqplib.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -95,4 +95,5 @@ [![Build Status](https://travis-ci.org/benbria/node-amqp-connection-manager.svg?branch=master)](https://travis-ci.org/benbria/node-amqp-connection-manager) | ||
* `options.heartbeatIntervalInSeconds` - Interval to send heartbeats to broker. Defaults to 5 seconds. | ||
* `options.reconnectTimeInSeconds` - The time to wait before trying to reconnect. If not specified, | ||
defaults to `heartbeatIntervalInSeconds`. | ||
### AmqpConnectionManager events | ||
@@ -99,0 +100,0 @@ * `connect({connection, url})` - Emitted whenever we successfully connect to a broker. |
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
23471
365
170