Comparing version 2.3.9 to 2.4.0
@@ -27,4 +27,5 @@ 'use strict'; | ||
var spawn = void 0; | ||
var broker_list = void 0; | ||
var await_response = function await_response(topic, id, work) { | ||
var await_response = function await_response(topic, id, work, broker_list) { | ||
var offset = 1; // Skip the initial message which creates the topic | ||
@@ -36,3 +37,3 @@ var exit = true; // Cleanup when we've received our response | ||
(0, _consume.consume)(response_topic, work, { group: false, offset: offset, exit: exit }); | ||
}); | ||
}, broker_list); | ||
@@ -73,4 +74,5 @@ return response_topic; | ||
var produce = function produce(topic, message, work, callback) { | ||
var produce = function produce(topic, message, work, callback, broker_string) { | ||
if (!topic) throw new _error.BrokerError('A topic argument is required!'); | ||
broker_list = broker_string || _run.brokers; | ||
@@ -81,6 +83,6 @@ var id = _uuid2.default.v4(); | ||
var message_file_path = _run.tmp + '/elytron.message.' + topic + '.' + id; | ||
var produce_options = ['-P', '-T', '-b', _run.brokers, '-t', topic, message_file_path]; | ||
var produce_options = ['-P', '-T', '-b', broker_list, '-t', topic, message_file_path]; | ||
if (work) { | ||
payload.response_topic = await_response(topic, id, work); | ||
payload.response_topic = await_response(topic, id, work, broker_list); | ||
(0, _logger.log)('Awaiting response on topic: ' + payload.response_topic); | ||
@@ -87,0 +89,0 @@ } |
{ | ||
"name": "elytron", | ||
"version": "2.3.9", | ||
"version": "2.4.0", | ||
"description": "An interface for Kafka in Node", | ||
@@ -5,0 +5,0 @@ "main": "./dist/src/index.js", |
@@ -9,4 +9,5 @@ import fs from 'fs'; | ||
let spawn; | ||
let broker_list; | ||
const await_response = (topic, id, work) => { | ||
const await_response = (topic, id, work, broker_list) => { | ||
const offset = 1; // Skip the initial message which creates the topic | ||
@@ -17,3 +18,3 @@ const exit = true; // Cleanup when we've received our response | ||
consume(response_topic, work, { group: false, offset, exit }); | ||
}); | ||
}, broker_list); | ||
@@ -54,4 +55,5 @@ return response_topic; | ||
const produce = (topic, message, work, callback) => { | ||
const produce = (topic, message, work, callback, broker_string) => { | ||
if (! topic) throw new BrokerError('A topic argument is required!'); | ||
broker_list = broker_string || brokers; | ||
@@ -63,7 +65,7 @@ const id = uuid.v4(); | ||
const produce_options = [ | ||
'-P', '-T', '-b', brokers, '-t', topic, message_file_path | ||
'-P', '-T', '-b', broker_list, '-t', topic, message_file_path | ||
]; | ||
if (work) { | ||
payload.response_topic = await_response(topic, id, work); | ||
payload.response_topic = await_response(topic, id, work, broker_list); | ||
log(`Awaiting response on topic: ${payload.response_topic}`); | ||
@@ -70,0 +72,0 @@ } |
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
41769
681