Optional
batchTimeout in milliseconds to flush incomplete batches.
When specified, incomplete batches will be flushed and processed after this timeout, even if they haven't reached the target batchSize. Useful for handling slow or irregular input streams.
Optional
batchMaximum number of items per batch.
Optional
concurrencyMaximum number of concurrent tasks.
map()
: Controls how many individual items are processed concurrentlymapBatch()
: Controls how many batches are processed concurrentlyOptional
preserveWhether to preserve the order of results.
When true
, results are yielded in the same order as the input items,
which may reduce throughput as processing waits for earlier items to complete.
When false
, results are yielded as soon as they're available.
Optional
signalsame signature as fetch(), but for aborting operations. If provided, the operation will be aborted when the signal is aborted.
Optional
timeouttimeout in milliseconds. This works in tandem with the signal option, whichever triggers first (signal or timeout) will abort the operation.
Default configuration options that can be applied to all stream operations.