Optional
Readonly
concurrencyMaximum number of concurrent invocations of mapper
to run at once.
The number of concurrent invocations is dynamically adjusted based on the maxUnread
limit:
maxUnread
is 10 with concurrency
of 4, all 4 mappers can run.maxUnread
limit of 10.This ensures efficient processing while maintaining backpressure through the maxUnread
limit.
Setting concurrency
to 1 enables serial processing, preserving the order of items
while still benefiting from the backpressure mechanism.
Must be an integer from 1 and up or Infinity
, and must be <= maxUnread
.
4
Optional
Readonly
maxMaximum number of unread items allowed to accumulate before applying backpressure.
This parameter is crucial for controlling memory usage and system load by:
For example, when reading from a slow database:
Must be an integer from 1 and up or Infinity
, and must be >= concurrency
.
It is not typical to set this value to Infinity
, but rather to a value such as 1 to 10.
8
Optional
Readonly
stopWhen set to false
, instead of stopping when a promise rejects, it will wait for all
the promises to settle and then reject with an
aggregated error containing all the
errors from the rejected promises.
true
Generated using TypeDoc
Options for IterableMapper