PersistentAI API Documentation / @persistentai/fireflow-types / pumpChannelToDBOSStream
Function: pumpChannelToDBOSStream()
pumpChannelToDBOSStream<
T>(channel,dbos,streamKey):Promise<void>
Defined in: packages/fireflow-types/src/flow/execution/runtime/stream-bridge.ts:75
Pump all data from a MultiChannel into a DBOS stream. Designed to run INSIDE a DBOS step via dbos.runStep().
Iterates the channel until it closes, writing each item to the DBOS stream via writeStream(). At-least-once semantics from steps is acceptable for streaming data (append-only, consumers can deduplicate via DBOS stream offsets).
IMPORTANT: Does NOT call closeStream() — that must be called at the workflow level after this step completes, because closeStream is not allowed from within steps.
Type Parameters
T
T
Parameters
channel
MultiChannel<T>
The MultiChannel to read from
dbos
DBOS context service (for writeStream)
streamKey
string
The DBOS stream key to write to
Returns
Promise<void>