node-nats-streaming-buffered-client
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -133,2 +133,4 @@ "use strict"; | ||
_this.logger.log('[NATS-BUFFERED-CLIENT] Constructing...'); | ||
_this.logger.log('[NATS-BUFFERED-CLIENT] Buffer size', _this.bufferSize); | ||
_this.logger.log('[NATS-BUFFERED-CLIENT] Batch size', _this.batchSize); | ||
// Initialize our ring buffer with the requested size | ||
@@ -374,3 +376,3 @@ // | ||
if (this.stan) { | ||
var batchItems = this.buffer.slice(0, this.bufferSize); | ||
var batchItems = this.buffer.slice(0, this.batchSize); | ||
if (!batchItems.length) { | ||
@@ -384,3 +386,3 @@ this.logger.log('[NATS-BUFFERED-CLIENT] Buffer is empty. Going to sleep'); | ||
// | ||
this.buffer = this.buffer.slice(this.bufferSize); | ||
this.buffer = this.buffer.slice(this.batchSize); | ||
// Collect publish promises for the entire batch | ||
@@ -409,3 +411,3 @@ // | ||
.then(function () { | ||
_this.logger.log("[NATS-BUFFERED-CLIENT] Buffer utilitisation " + Math.round(_this.buffer.length * 100 / _this.bufferSize) + "%", _this.buffer.length); | ||
_this.logger.log("[NATS-BUFFERED-CLIENT] Buffer utilisation " + Math.round(_this.buffer.length * 100 / _this.bufferSize) + "%", _this.buffer.length); | ||
// Next buffer item batch | ||
@@ -412,0 +414,0 @@ // |
{ | ||
"name": "node-nats-streaming-buffered-client", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
43215
633