@514labs/moose-lib
Advanced tools
Comparing version 0.3.695 to 0.3.696
@@ -577,2 +577,3 @@ #!/usr/bin/env node | ||
var import_http3 = __toESM(require("http")); | ||
var has_no_output_topic = (args) => args.targetTopic === ""; | ||
var MAX_STREAMING_CONCURRENCY = import_node_process4.default.env.MAX_STREAMING_CONCURRENCY ? parseInt(import_node_process4.default.env.MAX_STREAMING_CONCURRENCY) : 100; | ||
@@ -648,3 +649,3 @@ var parseArgs = () => { | ||
logger.log(`Received message with no value, skipping...`); | ||
return null; | ||
return void 0; | ||
} | ||
@@ -668,3 +669,3 @@ try { | ||
} | ||
return null; | ||
return void 0; | ||
}); | ||
@@ -751,6 +752,9 @@ var sendMessages = (logger, args, producer, messages, maxMessageSize) => __async(void 0, null, function* () { | ||
logger.log(`Received ${batch.messages.length} message(s)`); | ||
const messages = (yield import_node_stream.Readable.from(batch.messages).map((message) => handleMessage(logger, streamingFunction, message), { | ||
const messages = yield import_node_stream.Readable.from(batch.messages).map((message) => handleMessage(logger, streamingFunction, message), { | ||
concurrency: MAX_STREAMING_CONCURRENCY | ||
}).toArray()).flat(); | ||
const filteredMessages = messages.filter((msg) => msg !== null); | ||
}).toArray(); | ||
if (has_no_output_topic(args)) { | ||
return; | ||
} | ||
const filteredMessages = messages.flat().filter((msg) => msg !== void 0); | ||
if (filteredMessages.length > 0) { | ||
@@ -814,3 +818,5 @@ yield sendMessages( | ||
try { | ||
yield startProducer(logger, producer); | ||
if (!has_no_output_topic(args)) { | ||
yield startProducer(logger, producer); | ||
} | ||
try { | ||
@@ -817,0 +823,0 @@ const targetTopicConfig = JSON.parse(args.targetTopicConfig); |
{ | ||
"name": "@514labs/moose-lib", | ||
"version": "0.3.695", | ||
"version": "0.3.696", | ||
"main": "./dist/index.js", | ||
@@ -5,0 +5,0 @@ "module": "./dist/index.mjs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
277035
3088