@pager/jackrabbit
Advanced tools
Comparing version 5.1.0 to 5.2.0
@@ -0,1 +1,8 @@ | ||
# [5.2.0](https://github.com/pagerinc/jackrabbit/compare/v5.1.0...v5.2.0) (2020-07-20) | ||
### Features | ||
* handle backpressure with streams ([#319](https://github.com/pagerinc/jackrabbit/issues/319)) ([016666c](https://github.com/pagerinc/jackrabbit/commit/016666cd07a6acdf8b0be8c18be2bbe2bd283126)) | ||
# [5.1.0](https://github.com/pagerinc/jackrabbit/compare/v5.0.10...v5.1.0) (2020-07-17) | ||
@@ -2,0 +9,0 @@ |
@@ -6,2 +6,3 @@ 'use strict'; | ||
const { v4: Uuid } = require('uuid'); | ||
const { Writable } = require('stream'); | ||
@@ -184,2 +185,19 @@ const Queue = require('./queue'); | ||
const getWritableStream = () => { | ||
return new Writable({ | ||
objectMode: true, | ||
write({ key, data, headers }, encoding, cb) { | ||
const ok = sendMessage(data, { key, headers }); | ||
if (ok) { | ||
process.nextTick(cb); | ||
} | ||
else { | ||
channel.once('drain', cb); | ||
} | ||
} | ||
}); | ||
}; | ||
const publishSafe = async (message, publishOptions) => { | ||
@@ -412,2 +430,3 @@ | ||
publishSafe, | ||
getWritableStream, | ||
rpcClient, | ||
@@ -414,0 +433,0 @@ rpcServer |
{ | ||
"name": "@pager/jackrabbit", | ||
"version": "5.1.0", | ||
"version": "5.2.0", | ||
"description": "Easy RabbitMQ for node", | ||
@@ -42,3 +42,3 @@ "keywords": [ | ||
"chai": "4.x", | ||
"eslint": "6.x", | ||
"eslint": "7.x", | ||
"eslint-config-hapi": "12.x", | ||
@@ -45,0 +45,0 @@ "eslint-plugin-hapi": "4.x", |
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
23135
562