@orion-js/echoes
Advanced tools
Comparing version 2.4.1 to 2.5.1
@@ -8,3 +8,3 @@ "use strict"; | ||
}); | ||
exports.default = _default; | ||
exports.default = startService; | ||
@@ -19,17 +19,15 @@ var _kafkajs = require("kafkajs"); | ||
function _default(options) { | ||
async function startService(options) { | ||
const kafka = new _kafkajs.Kafka(options.client); | ||
_config.default.producer = kafka.producer(options.producer); | ||
_config.default.consumer = kafka.consumer(options.consumer); | ||
await _config.default.producer.connect(); | ||
await _config.default.consumer.connect(); | ||
_config.default.producer.connect(); | ||
_config.default.consumer.connect(); | ||
for (const topic in options.echoes) { | ||
const echo = options.echoes[topic]; | ||
if (echo.type !== _types.default.event) continue; | ||
_config.default.consumer.subscribe({ | ||
topic | ||
await _config.default.consumer.subscribe({ | ||
topic, | ||
fromBeginning: options.readTopicsFromBeginning || false | ||
}); | ||
@@ -36,0 +34,0 @@ } |
{ | ||
"name": "@orion-js/echoes", | ||
"version": "2.4.1", | ||
"version": "2.5.1", | ||
"main": "lib/index.js", | ||
@@ -15,3 +15,3 @@ "author": "nicolaslopezj", | ||
"dependencies": { | ||
"@orion-js/helpers": "^2.4.1", | ||
"@orion-js/helpers": "^2.5.1", | ||
"axios": "^0.23.0", | ||
@@ -32,3 +32,3 @@ "jssha": "^3.2.0", | ||
}, | ||
"gitHead": "c9bae0139aaf8a543946b231f16ea896c863bbc3" | ||
"gitHead": "0fe0243dfe3740132fc5f4e8884f33236467c1b3" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
123522
321
0
Updated@orion-js/helpers@^2.5.1