MapStream namespace for streaming one-to-many transformations.
MapStream is similar to Map but returns results as an async iterable stream instead of an array. This is useful when:
import { mapstream } from '@numaproj/numaflow-js';const server = new mapstream.AsyncServer(async function* (datum) { const lines = datum.value.toString().split('\n'); for (const line of lines) { if (line.trim()) { yield new mapstream.Message(Buffer.from(line)); } }});server.start(); Copy
import { mapstream } from '@numaproj/numaflow-js';const server = new mapstream.AsyncServer(async function* (datum) { const lines = datum.value.toString().split('\n'); for (const line of lines) { if (line.trim()) { yield new mapstream.Message(Buffer.from(line)); } }});server.start();
MapStream namespace for streaming one-to-many transformations.
MapStream is similar to Map but returns results as an async iterable stream instead of an array. This is useful when:
Example